GNOME Bugzilla – Bug 701543
v4l2: call VIDIOC_REQBUFS with count = 0 in pool_finalize
Last modified: 2013-06-04 08:53:45 UTC
Created attachment 245934 [details] [review] patch Without this the following sequence fails: - set_caps() - object_stop() (does nothing) - set_format() -> VIDIOC_S_FMT - set_config() -> VIDIOC_REQBUFS with count = N - set_caps() - object_stop() - pool_finalize() - set_format() -> VIDIOC_S_FMT => EBUSY Usually the pool is started after set_config(), in which case object_stop() will result in a pool_stop and therefore VIDIOC_REQBUFS with count = 0 but that is not guaranteed. Also calling VIDIOC_REQBUFS with count = 0 in pool_finalize() if necessary fixes this problem.
commit 3417a791acdd364c86974552550f853a9c56f5b9 Author: Michael Olbrich <m.olbrich@pengutronix.de> Date: Mon Jun 3 17:07:10 2013 +0200 v4l2: call VIDIOC_REQBUFS with count = 0 in pool_finalize Without this the following sequence fails: - set_caps() - object_stop() (does nothing) - set_format() -> VIDIOC_S_FMT - set_config() -> VIDIOC_REQBUFS with count = N - set_caps() - object_stop() - pool_finalize() - set_format() -> VIDIOC_S_FMT => EBUSY Usually the pool is started after set_config(), in which case object_stop() will result in a pool_stop and therefore VIDIOC_REQBUFS with count = 0 but that is not guaranteed. Also calling VIDIOC_REQBUFS with count = 0 in pool_finalize() if necessary fixes this problem. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=701543