Commit 0ce33461 authored by Wim Taymans's avatar Wim Taymans

audiosrc: check for flushing state in provide_clock

Only provide a clock when we are not flushing, this means that we have posted a
PROVIDE_CLOCK message. We used to check if we were acquired but that doesn't
work anymore now that we do the negotiation async in the streaming thread: it's
possible that we are still negotiating when the pipeline asks us for a clock.
parent 44dab50b
......@@ -289,10 +289,11 @@ gst_audio_base_src_provide_clock (GstElement * elem)
if (src->ringbuffer == NULL)
goto wrong_state;
if (!gst_audio_ring_buffer_is_acquired (src->ringbuffer))
if (gst_audio_ring_buffer_is_flushing (src->ringbuffer))
goto wrong_state;
goto clock_disabled;
......@@ -304,7 +305,7 @@ gst_audio_base_src_provide_clock (GstElement * elem)
/* ERRORS */
GST_DEBUG_OBJECT (src, "ringbuffer not acquired");
GST_DEBUG_OBJECT (src, "ringbuffer is flushing");
return NULL;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment