Commit 5c8bb902 authored by Sebastian Dröge's avatar Sebastian Dröge
Browse files

deinterlace: Improve handling of min/max buffer numbers of the buffer pool

parent 30c00f4f
......@@ -2359,7 +2359,11 @@ gst_deinterlace_do_bufferpool (GstDeinterlace * self, GstCaps * outcaps)
gst_query_parse_nth_allocation_pool (query, 0, &pool, &size, &min, &max);
else {
pool = NULL;
size = GST_VIDEO_INFO_SIZE (&self->vinfo), min = max = 0;
size = GST_VIDEO_INFO_SIZE (&self->vinfo);
min =
MAX ((gst_deinterlace_method_get_fields_required (self->method) +
1) / 2 + 1, 4);
max = 0;
}
if (pool == NULL) {
......@@ -2620,7 +2624,9 @@ gst_deinterlace_propose_allocation (GstDeinterlace * self, GstQuery * query)
gst_query_add_allocation_pool (query, pool, size, 0, 0);
config = gst_buffer_pool_get_config (pool);
gst_buffer_pool_config_set_params (config, caps, size, 0, 0);
gst_buffer_pool_config_set_params (config, caps, size,
(gst_deinterlace_method_get_fields_required (self->method) + 1) / 2 + 1,
0);
gst_buffer_pool_set_config (pool, config);
gst_object_unref (pool);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment