After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 701543 - v4l2: call VIDIOC_REQBUFS with count = 0 in pool_finalize
v4l2: call VIDIOC_REQBUFS with count = 0 in pool_finalize
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 1.1.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-06-03 16:51 UTC by Michael Olbrich
Modified: 2013-06-04 08:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (2.52 KB, patch)
2013-06-03 16:51 UTC, Michael Olbrich
none Details | Review

Description Michael Olbrich 2013-06-03 16:51:19 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.
Comment 1 Wim Taymans 2013-06-04 08:53:45 UTC
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