From e18e25a324c6367210f0210f48afeab7ca38c529 Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Mon, 17 Jan 2011 20:09:16 +0530 Subject: [PATCH] pulsesink: Uncork stream while flushing the ringbuffer After starting the ringbuffer, we wait for enough data to arrive before uncorking the stream. This will cause the pipeline to stall if we get an EOS (or otherwise need to flush the stream) before sufficient data becomes available. This patch makes sure that the stream is uncorked while flushing to avoid this problem. Fixes issue with a webkit unit test testing reverse playback of an MP4 H.264/AAC file. https://bugzilla.gnome.org/show_bug.cgi?id=639740 --- ext/pulse/pulsesink.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ext/pulse/pulsesink.c b/ext/pulse/pulsesink.c index f885843c85..9bebfec3bb 100644 --- a/ext/pulse/pulsesink.c +++ b/ext/pulse/pulsesink.c @@ -2637,6 +2637,11 @@ gst_pulsesink_flush_ringbuffer (GstPulseSink * psink) gst_pulsering_flush (pbuf); + /* Uncork if we haven't already (happens when waiting to get enough data + * to send out the first time) */ + if (pbuf->corked) + gst_pulsering_set_corked (pbuf, FALSE, FALSE); + /* We're not interested if this operation failed or not */ unlock: pa_threaded_mainloop_unlock (mainloop);