queue2: set seeking flag with the queue lock
authorWim Taymans <wim.taymans@collabora.co.uk>
Tue, 10 Apr 2012 10:09:53 +0000 (12:09 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Tue, 10 Apr 2012 10:44:38 +0000 (12:44 +0200)
plugins/elements/gstqueue2.c

index ab725b5..35e5e1e 100644 (file)
@@ -1087,6 +1087,8 @@ perform_seek_to_offset (GstQueue2 * queue, guint64 offset)
   GstEvent *event;
   gboolean res;
 
+  /* until we receive the FLUSH_STOP from this seek, we skip data */
+  queue->seeking = TRUE;
   GST_QUEUE2_MUTEX_UNLOCK (queue);
 
   GST_DEBUG_OBJECT (queue, "Seeking to %" G_GUINT64_FORMAT, offset);
@@ -1096,8 +1098,6 @@ perform_seek_to_offset (GstQueue2 * queue, guint64 offset)
       GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_ACCURATE, GST_SEEK_TYPE_SET, offset,
       GST_SEEK_TYPE_NONE, -1);
 
-  /* until we receive the FLUSH_STOP from this seek, we skip data */
-  queue->seeking = TRUE;
   res = gst_pad_push_event (queue->sinkpad, event);
   GST_QUEUE2_MUTEX_LOCK (queue);