queue2: signal delete before waiting

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.
This commit is contained in:
Wim Taymans 2012-04-11 12:34:55 +02:00
parent dc3d3674b1
commit bdda711d03

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