rtspclientsink: Set async-handling=false for the internal bins

Without this we can easily run into a race condition with async state changes:
- the pipeline is doing an async state change
- we set the internal bins to PLAYING but that's ignored because an
  async state change is currently pending
- the async state change finishes but does not change the state of the
  internal bins because of locked_state==TRUE
- the internal bins stay in PAUSED forever
This commit is contained in:
Sebastian Dröge 2019-04-15 20:54:24 +03:00 committed by Sebastian Dröge
parent c4653ef38b
commit 640c5bba41

View file

@ -878,6 +878,7 @@ gst_rtsp_client_sink_init (GstRTSPClientSink * sink)
g_cond_init (&sink->open_conn_cond);
sink->internal_bin = (GstBin *) gst_bin_new ("rtspbin");
g_object_set (sink->internal_bin, "async-handling", TRUE, NULL);
gst_element_set_locked_state (GST_ELEMENT_CAST (sink->internal_bin), TRUE);
gst_bin_add (GST_BIN (sink), GST_ELEMENT_CAST (sink->internal_bin));