summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/libav/gstavviddec.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/ext/libav/gstavviddec.c b/ext/libav/gstavviddec.c
index 5497409..8c606ff 100644
--- a/ext/libav/gstavviddec.c
+++ b/ext/libav/gstavviddec.c
@@ -1416,6 +1416,16 @@ gst_ffmpegviddec_video_frame (GstFFMpegVidDec * ffmpegdec,
*ret = get_output_buffer (ffmpegdec, out_frame);
gst_buffer_unref (tmp);
}
+#ifndef G_DISABLE_ASSERT
+ else {
+ GstVideoMeta *vmeta = gst_buffer_get_video_meta (out_frame->output_buffer);
+ if (vmeta) {
+ GstVideoInfo *info = &ffmpegdec->output_state->info;
+ g_assert (vmeta->width == GST_VIDEO_INFO_WIDTH (info));
+ g_assert (vmeta->height == GST_VIDEO_INFO_HEIGHT (info));
+ }
+ }
+#endif
gst_object_unref (pool);
if (G_UNLIKELY (*ret != GST_FLOW_OK))
@@ -1881,7 +1891,9 @@ gst_ffmpegviddec_decide_allocation (GstVideoDecoder * decoder, GstQuery * query)
}
}
- if (have_videometa && ffmpegdec->internal_pool) {
+ if (have_videometa && ffmpegdec->internal_pool
+ && ffmpegdec->pool_width == state->info.width
+ && ffmpegdec->pool_height == state->info.height) {
update_pool = TRUE;
gst_object_unref (pool);
pool = gst_object_ref (ffmpegdec->internal_pool);