History

avformat/iamf_writer: be more verbose when reporting an input layout is invalid

James Almer committed 1 year ago

Commit 3fa70c01 parent aba9faf1 file · +8 −1Browse files

Unified · Split

libavformat/iamf_writer.c+8−1
@@ -19,6 +19,7 @@ · 18 unmodified lines
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */20 */
21 21
22#include "libavutil/bprint.h"
22#include "libavutil/channel_layout.h"23#include "libavutil/channel_layout.h"
23#include "libavutil/intreadwrite.h"24#include "libavutil/intreadwrite.h"
24#include "libavutil/iamf.h"25#include "libavutil/iamf.h"
@@ -256,7 +257,13 @@ int ff_iamf_add_audio_element(IAMFContext *iamf, const AVStreamGroup *stg, void · 231 unmodified lines
256 if (!av_channel_layout_compare(&layer->ch_layout, &ff_iamf_expanded_scalable_ch_layouts[j]))257 if (!av_channel_layout_compare(&layer->ch_layout, &ff_iamf_expanded_scalable_ch_layouts[j]))
257 break;258 break;
258 if (j >= FF_ARRAY_ELEMS(ff_iamf_expanded_scalable_ch_layouts)) {259 if (j >= FF_ARRAY_ELEMS(ff_iamf_expanded_scalable_ch_layouts)) {
259 av_log(log_ctx, AV_LOG_ERROR, "Unsupported channel layout in stream group #%d\n", i);260 AVBPrint bp;
261 av_bprint_init(&bp, 0, AV_BPRINT_SIZE_AUTOMATIC);
262 av_channel_layout_describe_bprint(&layer->ch_layout, &bp);
263 av_log(log_ctx, AV_LOG_ERROR, "Unsupported channel layout in Audio Element id %"PRId64
264 ", Layer %d: %s\n",
265 stg->id, i, bp.str);
266 av_bprint_finalize(&bp, NULL);
260 return AVERROR(EINVAL);267 return AVERROR(EINVAL);
261 }268 }
262 }269 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t