queue2: set seeking flag with the queue lock

This commit is contained in:
Wim Taymans 2012-04-10 12:09:53 +02:00
parent 5755e24379
commit b7a8051d95

View 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);