rtsp-client: Allow backlog to grow while expiring session

Allow the send backlog in the RTSP watch to grow to unlimited size while
attempting to bring the media pipeline to NULL due to a session
expiring.  Without this change the appsink element cannot change state
because it is blocked while rendering data in the new_sample callback.
This callback will block until it has successfully put the data into the
send backlog. There is a chance that the send backlog is full at this
point which means that the callback may block for a long time, possibly
forever. Therefore the media pipeline may also be prevented from
changing state for a long time.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=736647
This commit is contained in:
Branko Subasic 2014-09-19 18:28:30 +02:00 committed by Sebastian Dröge
parent 980553547d
commit 733ef1162b

View file

@ -2211,7 +2211,11 @@ client_session_removed (GstRTSPSessionPool * pool, GstRTSPSession * session,
GST_INFO ("client %p: session %p removed", client, session);
g_mutex_lock (&priv->lock);
if (priv->watch != NULL)
gst_rtsp_watch_set_send_backlog (priv->watch, 0, 0);
client_unwatch_session (client, session, NULL);
if (priv->watch != NULL)
gst_rtsp_watch_set_send_backlog (priv->watch, 0, WATCH_BACKLOG_SIZE);
g_mutex_unlock (&priv->lock);
}