deinterlace: use output caps to compute buffer size

In interlace-mode=alternate the input buffers have half the size of the
output ones as each field has its own buffer.
This commit is contained in:
Guillaume Desmottes 2020-01-14 14:51:07 +05:30 committed by GStreamer Merge Bot
parent 3287f1cb3f
commit 6dde6038cc

View file

@ -2614,8 +2614,12 @@ gst_deinterlace_do_bufferpool (GstDeinterlace * self, GstCaps * outcaps)
if (gst_query_get_n_allocation_pools (query) > 0)
gst_query_parse_nth_allocation_pool (query, 0, &pool, &size, &min, &max);
else {
GstVideoInfo out_info;
gst_video_info_from_caps (&out_info, outcaps);
pool = NULL;
size = GST_VIDEO_INFO_SIZE (&self->vinfo);
size = GST_VIDEO_INFO_SIZE (&out_info);
min =
MAX ((gst_deinterlace_method_get_fields_required (self->method) +
1) / 2 + 1, 4);