From a0b651bf5ba51eb385e43d61dd74cb786057d4fd Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 16 Feb 2010 19:53:09 +0100 Subject: [PATCH] rtspsrc: avoid stopping NULL tasks Check the task for NULL, it could be paused and set to NULL before. --- gst/rtsp/gstrtspsrc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c index 281371f703..c99e381cc2 100644 --- a/gst/rtsp/gstrtspsrc.c +++ b/gst/rtsp/gstrtspsrc.c @@ -3425,7 +3425,10 @@ pause: GST_DEBUG_OBJECT (src, "pausing task, reason %s", reason); src->running = FALSE; - gst_task_pause (src->task); + if (src->task) { + /* can be NULL when we stopped and unreffed already */ + gst_task_pause (src->task); + } if (GST_FLOW_IS_FATAL (ret) || ret == GST_FLOW_NOT_LINKED) { if (ret == GST_FLOW_UNEXPECTED) { /* perform EOS logic */