From 640c5bba41e6227d16f96c65796512264d522acc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 15 Apr 2019 20:54:24 +0300 Subject: [PATCH] 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 --- gst/rtsp-sink/gstrtspclientsink.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gst/rtsp-sink/gstrtspclientsink.c b/gst/rtsp-sink/gstrtspclientsink.c index 8d4b25d07c..c37449487f 100644 --- a/gst/rtsp-sink/gstrtspclientsink.c +++ b/gst/rtsp-sink/gstrtspclientsink.c @@ -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));