queue/queue2: Ensure that the streaming thread is unlocked after deactivating the...
[platform/upstream/gstreamer.git] / plugins / elements / gstqueue.c
index c3176b9..1f0c09c 100644 (file)
@@ -1729,6 +1729,10 @@ gst_queue_src_activate_mode (GstPad * pad, GstObject * parent, GstPadMode mode,
 
         /* step 2, make sure streaming finishes */
         result = gst_pad_stop_task (pad);
+
+        GST_QUEUE_MUTEX_LOCK (queue);
+        gst_queue_locked_flush (queue, FALSE);
+        GST_QUEUE_MUTEX_UNLOCK (queue);
       }
       break;
     default: