From 61ce7b1a62795c438f41e0a02dbeb7ea555abda4 Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Thu, 5 Dec 2013 19:36:25 -0500 Subject: [PATCH] v4l2object: Ensure max is not smaller then min in decide_allocation https://bugzilla.gnome.org/show_bug.cgi?id=720568 --- sys/v4l2/gstv4l2object.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/v4l2/gstv4l2object.c b/sys/v4l2/gstv4l2object.c index 9d0f809528..e605419a21 100644 --- a/sys/v4l2/gstv4l2object.c +++ b/sys/v4l2/gstv4l2object.c @@ -3190,6 +3190,10 @@ gst_v4l2_object_decide_allocation (GstV4l2Object * obj, GstQuery * query) min += ctl.value; } + /* Request a bigger max, if one was suggested but it's too small */ + if (max != 0 && max < min) + max = min; + /* select a pool */ switch (obj->mode) { case GST_V4L2_IO_RW: