v4l2src: do not try to change device format if it's already correct
authorHavoc Pennington <hp@pobox.com>
Wed, 16 Jun 2010 15:21:35 +0000 (11:21 -0400)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Wed, 16 Jun 2010 15:48:47 +0000 (17:48 +0200)
commitf06b105058e73162275b50bdba89c6791e218d03
tree05a17cbabe862a97f17947b4000f04cc66e86c07
parent9b9f9d0a2a93365e2577c5bad8591f82bbf9e6d0
v4l2src: do not try to change device format if it's already correct

This allows set_caps to succeed if caps change in a way that
would not modify the format we're getting from the hardware.
Otherwise if not in NULL state, setting caps would fail
with EBUSY.

With this change, in some cases it's OK to go PLAYING->READY->PLAYING
rather than PLAYING->NULL->PLAYING to avoid a time-consuming close
and reopen of the device.

Fixes #621723
sys/v4l2/gstv4l2object.c