GNOME Bugzilla – Bug 405284
Changing state of pipeline can lock up with preroll queue length > 0
Last modified: 2007-02-12 11:33:09 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.
Created attachment 82072 [details] [review] Modified stress.c to exhibit pipeline state change lockup.
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.