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
1919 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
2020 */
2121
22+#include "libavutil/bprint.h"
2223 #include "libavutil/channel_layout.h"
2324 #include "libavutil/intreadwrite.h"
2425 #include "libavutil/iamf.h"
@@ -256,7 +257,13 @@ int ff_iamf_add_audio_element(IAMFContext *iamf, const AVStreamGroup *stg, void · 231 unmodified lines
256257 if (!av_channel_layout_compare(&layer->ch_layout, &ff_iamf_expanded_scalable_ch_layouts[j]))
257258 break;
258259 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);
260267 return AVERROR(EINVAL);
261268 }
262269 }

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