mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
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
This commit is contained in:
parent
eac9efb92e
commit
0a7d4afc1b
1 changed files with 1 additions and 0 deletions
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue