v4l2object: Ensure max is not smaller then min in decide_allocation

https://bugzilla.gnome.org/show_bug.cgi?id=720568
This commit is contained in:
Nicolas Dufresne 2013-12-05 19:36:25 -05:00
parent b261287745
commit 61ce7b1a62

View file

@ -3190,6 +3190,10 @@ gst_v4l2_object_decide_allocation (GstV4l2Object * obj, GstQuery * query)
min += ctl.value; 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 */ /* select a pool */
switch (obj->mode) { switch (obj->mode) {
case GST_V4L2_IO_RW: case GST_V4L2_IO_RW: