rtspconnection: Remove read child source when POST is disconnected

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=724720
This commit is contained in:
Ognyan Tonchev 2014-02-19 13:53:06 +01:00 committed by Wim Taymans
parent e8d58b432e
commit ebe3530f51

View file

@ -3025,6 +3025,19 @@ gst_rtsp_source_dispatch_read (GPollableInputStream * stream,
if (res == GST_RTSP_EINTR)
goto done;
else if (G_UNLIKELY (res == GST_RTSP_EEOF)) {
if (watch->readsrc) {
g_source_remove_child_source ((GSource *) watch, watch->readsrc);
g_source_unref (watch->readsrc);
watch->readsrc = NULL;
}
if (conn->stream1) {
g_object_unref (conn->stream1);
conn->stream1 = NULL;
conn->socket1 = NULL;
conn->input_stream = NULL;
}
/* When we are in tunnelled mode, the read socket can be closed and we
* should be prepared for a new POST method to reopen it */
if (conn->tstate == TUNNEL_STATE_COMPLETE) {