From 7d49740269be29b37a29e73fcf91d4de7db50ef9 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Fri, 15 Nov 2024 11:34:07 +0100 Subject: [PATCH] libav: viddec: provide details if meta has the wrong resolution Will produce a more useful assert error message. Part-of: --- subprojects/gst-libav/ext/libav/gstavviddec.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/subprojects/gst-libav/ext/libav/gstavviddec.c b/subprojects/gst-libav/ext/libav/gstavviddec.c index 016b2f2740..aa008bc57b 100644 --- a/subprojects/gst-libav/ext/libav/gstavviddec.c +++ b/subprojects/gst-libav/ext/libav/gstavviddec.c @@ -2026,8 +2026,12 @@ gst_ffmpegviddec_video_frame (GstFFMpegVidDec * ffmpegdec, gst_buffer_get_video_meta (output_frame->output_buffer); if (vmeta) { GstVideoInfo *info = &ffmpegdec->output_state->info; - g_assert ((gint) vmeta->width == GST_VIDEO_INFO_WIDTH (info)); - g_assert ((gint) vmeta->height == GST_VIDEO_INFO_HEIGHT (info)); + if (vmeta->width != GST_VIDEO_INFO_WIDTH (info) || + vmeta->height != GST_VIDEO_INFO_HEIGHT (info)) { + g_error ("video meta uses %dx%d instead of %dx%d", + vmeta->width, vmeta->height, GST_VIDEO_INFO_WIDTH (info), + GST_VIDEO_INFO_HEIGHT (info)); + } } } #endif