summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gst/rtsp/gstrtspsrc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c
index feab0d71..93af6c62 100644
--- a/gst/rtsp/gstrtspsrc.c
+++ b/gst/rtsp/gstrtspsrc.c
@@ -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 */