rtsp: fix input/output streams for tunneling
authorWim Taymans <wim.taymans@collabora.co.uk>
Wed, 29 May 2013 14:15:32 +0000 (16:15 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Thu, 30 May 2013 05:35:18 +0000 (07:35 +0200)
gst-libs/gst/rtsp/gstrtspconnection.c

index c0f3ec7..5d467cc 100644 (file)
@@ -2639,13 +2639,16 @@ gst_rtsp_connection_do_tunnel (GstRTSPConnection * conn,
     /* both connections have socket0 as the read/write socket. start by taking the
      * socket from conn2 and set it as the socket in conn */
     conn->socket1 = conn2->socket0;
+    conn->connection1 = conn2->connection0;
+    conn->input_stream = conn2->input_stream;
 
     /* clean up some of the state of conn2 */
     g_cancellable_cancel (conn2->cancellable);
-    conn2->socket0 = 0;
-    g_object_unref (conn2->socket1);
-    conn2->socket1 = NULL;
     conn2->write_socket = conn2->read_socket = NULL;
+    conn2->socket0 = NULL;
+    conn2->connection0 = NULL;
+    conn2->input_stream = NULL;
+    conn2->output_stream = NULL;
     g_cancellable_reset (conn2->cancellable);
 
     /* We make socket0 the write socket and socket1 the read socket. */