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 584657 - gst-launch should set pipeline to PAUSED before clearing main loop
gst-launch should set pipeline to PAUSED before clearing main loop
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: 0.10.24
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-06-02 20:44 UTC by David Schleef
Modified: 2009-08-10 23:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (904 bytes, patch)
2009-06-02 20:44 UTC, David Schleef
none Details | Review

Description David Schleef 2009-06-02 20:44:24 UTC
When it is shutting down a pipeline after ctrl-c, gst-launch currently calls g_main_context_iteration() to clear any pending signals, idle functions, and such.  However, the pipeline is still running at this point, so could be generating new idle functions and signals.  If the main loop never becomes completely idle (easy to do with valgrind or in error situations), gst-launch will never PAUSE the pipeline and subsequently not exit.
Comment 1 David Schleef 2009-06-02 20:44:52 UTC
Created attachment 135844 [details] [review]
patch
Comment 2 David Schleef 2009-06-02 20:51:23 UTC
commit 08fb55c2e1053e19a6c88e365e567d3352e92ee4
Author: David Schleef <ds@schleef.org>
Date:   Tue Jun 2 13:45:52 2009 -0700

    tools: Set pipeline to PAUSED before waiting for main loop idle
    
    When it is shutting down a pipeline after ctrl-c, set pipeline to
    paused before waiting for the main loop to complete all pending
    transactions.  Fixes #584657.
    
    If some part of the pipeline is generating signals or idle functions
    at a fast rate, waiting for a main loop iteration may never return.