rtspsrc: don't send teardown before setup
authorWim Taymans <wim.taymans@collabora.co.uk>
Sun, 24 May 2009 14:33:42 +0000 (16:33 +0200)
committerWim Taymans <wim@metal.(none)>
Sun, 24 May 2009 14:33:42 +0000 (16:33 +0200)
Don't send a TEARDOWN request when we did not manage to successfully setup a
stream.

gst/rtsp/gstrtspsrc.c

index feab0d7..93af6c6 100644 (file)
@@ -4709,6 +4709,10 @@ gst_rtspsrc_close (GstRTSPSrc * src)
     GST_DEBUG_OBJECT (src, "not connected, doing cleanup");
     goto close;
   }
+  if (src->state < GST_RTSP_STATE_READY) {
+    GST_DEBUG_OBJECT (src, "not ready, doing cleanup");
+    goto close;
+  }
 
   if (src->methods & (GST_RTSP_PLAY | GST_RTSP_TEARDOWN)) {
     /* do TEARDOWN */