[gstreamer-bugs] [Bug 580716] New: race condition in gst_element_lost_state

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Wed Apr 29 02:39:47 PDT 2009


If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
  http://bugzilla.gnome.org/show_bug.cgi?id=580716

  GStreamer | gstreamer (core) | Ver: git
           Summary: race condition in gst_element_lost_state
           Product: GStreamer
           Version: git
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gstreamer (core)
        AssignedTo: gstreamer-bugs at lists.sourceforge.net
        ReportedBy: wingo at pobox.com
         QAContact: gstreamer-bugs at lists.sourceforge.net
     GNOME version: Unspecified
   GNOME milestone: Unspecified


gst_element_lost_state has a race condition. Here's my understanding of how it
can happen, but Wim understands it better.

  1. Have a pipeline in PLAYING
  2. Set it to PAUSED
  3. Send a flushing seek

After (2) the pipeline is asynchronously changing to paused. If the transition
completes successfully before the seek happens, there's no race; but if we seek
while the element has a GST_STATE_PENDING, the sink's call to
gst_element_lost_state will fail to post an async-start message.

The async-start message is needed to tell the pipeline to reset the base time
when the element goes PLAYING again. Loss of this message means that the
pipeline won't get a base_time reset.

We haven't seen this problem very much until now because most of our pipelines
run with the audio clock, which does not run in PAUSED, hence no need to
distribute a new base time. But if the clock does run in PAUSED, this problem
is fairly easy to hit.

The solution is to post async-start (though not state-changed) in
gst_element_lost_state if lost_state is called during an async state change.


-- 
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=580716.




More information about the Gstreamer-bugs mailing list