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
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);
}