Commit 0a7d4afc authored by Diogo Carbonera Luvizon's avatar Diogo Carbonera Luvizon Committed by Wim Taymans
Browse files

v4l2: save the format correctly

If TRY_FMT is not implemented,  gst_v4l2_object_get_nearest_size will
use S_FMT and will change the device's operation mode. To save the
old device mode we need to set the type field or else it will fail
to save the previous format.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=685209
parent eac9efb9
......@@ -2054,6 +2054,7 @@ gst_v4l2_object_get_nearest_size (GstV4l2Object * v4l2object,
/* Some drivers are buggy and will modify the currently set format
when processing VIDIOC_TRY_FMT, so we remember what is set at the
minute, and will reset it when done. */
prevfmt.type = v4l2object->type;
prevfmt_valid = (v4l2_ioctl (fd, VIDIOC_G_FMT, &prevfmt) >= 0);
/* get size delimiters */
......
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