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 405284 - Changing state of pipeline can lock up with preroll queue length > 0
Changing state of pipeline can lock up with preroll queue length > 0
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.10.11
Other Linux
: Normal normal
: 0.10.12
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-02-07 09:34 UTC by Will Newton
Modified: 2007-02-12 11:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Modified stress.c to exhibit pipeline state change lockup. (2.33 KB, patch)
2007-02-07 09:37 UTC, Will Newton
committed Details | Review

Description Will Newton 2007-02-07 09:34:47 UTC
Changing the state of a pipeline with a sink with a preroll queue length greater than 0 can lockup. I have attached a modified version of the stress.c testcase that demonstrates the problem.

I found a possible fix for the problem - add code after the FIXME in gst_base_sink_queue_object_unlocked (around line 1740 current CVS) to check the return value of gst_base_sink_render_object and cleanup and return if it's not equal to GST_FLOW_OK.
Comment 1 Will Newton 2007-02-07 09:37:09 UTC
Created attachment 82072 [details] [review]
Modified stress.c to exhibit pipeline state change lockup.
Comment 2 Wim Taymans 2007-02-12 11:33:09 UTC
thanks, this commit should fix it.

        * libs/gst/base/gstbasesink.c: (gst_base_sink_class_init),
        (gst_base_sink_get_latency), (gst_base_sink_query_latency),
        (gst_base_sink_wait_clock), (gst_base_sink_send_qos),
        (gst_base_sink_perform_qos), (gst_base_sink_queue_object_unlocked),
        (gst_base_sink_chain_unlocked), (gst_base_sink_send_event),
        (gst_base_sink_get_position), (gst_base_sink_query),
        (gst_base_sink_change_state):
        * libs/gst/base/gstbasesink.h:
        API: gst_base_sink_query_latency() to let subclasses query the upstream
        latency.
        API: gst_base_sink_get_latency() to let subclasses query the configured
        latency in the sink.
        Implement query and set latency.
        Update some docs.
        As spotted by Will Newton <will dot newton at gmail dot com>: Make sure we
        don't continue preroll when we are flushing. Fixes #405284.

        * tests/check/pipelines/stress.c: (change_state_timeout),
        (quit_timeout), (GST_START_TEST), (stress_suite):
        Test for #405284.