[FFmpeg-cvslog] avformat/iamf_writer: be more verbose when reporting an input layout is invalid
James Almer
git at videolan.org
Fri Jan 3 15:30:25 EET 2025
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Mon Dec 30 15:35:24 2024 -0300| [3fa70c03e4bf0eb2661324305dce48795a5b9c8d] | committer: James Almer
avformat/iamf_writer: be more verbose when reporting an input layout is invalid
Signed-off-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3fa70c03e4bf0eb2661324305dce48795a5b9c8d
---
libavformat/iamf_writer.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/libavformat/iamf_writer.c b/libavformat/iamf_writer.c
index 649bafc2cf..6b07dd85c9 100644
--- a/libavformat/iamf_writer.c
+++ b/libavformat/iamf_writer.c
@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/bprint.h"
#include "libavutil/channel_layout.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/iamf.h"
@@ -256,7 +257,13 @@ int ff_iamf_add_audio_element(IAMFContext *iamf, const AVStreamGroup *stg, void
if (!av_channel_layout_compare(&layer->ch_layout, &ff_iamf_expanded_scalable_ch_layouts[j]))
break;
if (j >= FF_ARRAY_ELEMS(ff_iamf_expanded_scalable_ch_layouts)) {
- av_log(log_ctx, AV_LOG_ERROR, "Unsupported channel layout in stream group #%d\n", i);
+ AVBPrint bp;
+ av_bprint_init(&bp, 0, AV_BPRINT_SIZE_AUTOMATIC);
+ av_channel_layout_describe_bprint(&layer->ch_layout, &bp);
+ av_log(log_ctx, AV_LOG_ERROR, "Unsupported channel layout in Audio Element id %"PRId64
+ ", Layer %d: %s\n",
+ stg->id, i, bp.str);
+ av_bprint_finalize(&bp, NULL);
return AVERROR(EINVAL);
}
}
More information about the ffmpeg-cvslog
mailing list