[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gstreamer-cvs
Subject:    gst-plugins-good: pulsesink: also uncork during EOS waiting ( and
From:       mnauw () kemper ! freedesktop ! org (Mark Nauwelaerts)
Date:       2011-03-31 11:27:53
Message-ID: 20110331112753.44C9DF80E1 () kemper ! freedesktop ! org
[Download RAW message or body]

Module: gst-plugins-good
Branch: master
Commit: 176b8ffbfffb39d0d340e3e5f19f1081884523d7
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=176b8ffbfffb39d0d340e3e5f19f1081884523d7


Author: Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Date:   Thu Mar 31 13:25:00 2011 +0200

pulsesink: also uncork during EOS waiting (and after EOS is rendered)

Pulsesink was recently changed to defer uncorking until there is data
to write. This condition will however never occur when EOS in being
rendered (since that marks the end of data). Changing to PAUSED state
while EOS is being waited on results in a hang: pausing corks the
stream, which will never be undone since there is no more data when
going back to PLAYING. If pulsesink is the clock provider, deadlock
ensues since time doesn't continue in corked state and the clock id
for EOS wait never fires.

Fixes #645961.

---

 ext/pulse/pulsesink.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/ext/pulse/pulsesink.c b/ext/pulse/pulsesink.c
index 5a60cda..79c5ea8 100644
--- a/ext/pulse/pulsesink.c
+++ b/ext/pulse/pulsesink.c
@@ -1081,6 +1081,13 @@ gst_pulseringbuffer_start (GstRingBuffer * buf)
 
   GST_DEBUG_OBJECT (psink, "starting");
   pbuf->paused = FALSE;
+
+  /* EOS needs running clock */
+  if (GST_BASE_SINK_CAST (psink)->eos ||
+      g_atomic_int_get (&GST_BASE_AUDIO_SINK (psink)->abidata.
+          ABI.eos_rendering))
+    gst_pulsering_set_corked (pbuf, FALSE, FALSE);
+
   pa_threaded_mainloop_unlock (mainloop);
 
   return TRUE;

_______________________________________________
gstreamer-commits mailing list
gstreamer-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/gstreamer-commits


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic