queue2: signal delete before waiting
authorWim Taymans <wim.taymans@collabora.co.uk>
Wed, 11 Apr 2012 10:34:55 +0000 (12:34 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Wed, 11 Apr 2012 10:45:46 +0000 (12:45 +0200)
When we don't have the requested data in the ringbuffer and we move our read
pointer to the requested position, signal the delete cond to inform the writer
that we changed the current fill level. If we don't, the writer might stay
blocked and we might wait forever.

plugins/elements/gstqueue2.c

index f0dd2ec..ebd2cde 100644 (file)
@@ -1309,6 +1309,7 @@ gst_queue2_create_read (GstQueue2 * queue, guint64 offset, guint length,
               "update current position [%" G_GUINT64_FORMAT "-%"
               G_GUINT64_FORMAT "]", rpos, queue->current->max_reading_pos);
           update_cur_pos (queue, queue->current, rpos);
+          GST_QUEUE2_SIGNAL_DEL (queue);
         }
         GST_DEBUG_OBJECT (queue, "waiting for add");
         GST_QUEUE2_WAIT_ADD_CHECK (queue, queue->srcresult, out_flushing);