rtspsrc: avoid stopping NULL tasks

Check the task for NULL, it could be paused and set to NULL before.
This commit is contained in:
Wim Taymans 2010-02-16 19:53:09 +01:00 committed by Wim Taymans
parent d14685eb08
commit a0b651bf5b

View file

@ -3425,7 +3425,10 @@ pause:
GST_DEBUG_OBJECT (src, "pausing task, reason %s", reason); GST_DEBUG_OBJECT (src, "pausing task, reason %s", reason);
src->running = FALSE; 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 (GST_FLOW_IS_FATAL (ret) || ret == GST_FLOW_NOT_LINKED) {
if (ret == GST_FLOW_UNEXPECTED) { if (ret == GST_FLOW_UNEXPECTED) {
/* perform EOS logic */ /* perform EOS logic */