[gst-cvs] gst-plugins-good: pulsesink: Wait until there is enough room to write an entire segment

Jan Schmidt thaytan at kemper.freedesktop.org
Fri Mar 13 08:59:13 PDT 2009


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

Author: Jan Schmidt <thaytan at noraisin.net>
Date:   Fri Mar 13 15:40:50 2009 +0000

pulsesink: Wait until there is enough room to write an entire segment

When trying to write out a segment, wait until there is enough free space
for the entire segment. This helps to reduce ripple in the clock reporting,
where the app might query the playback position while only half a segment
has been written (and is therefore reported by _delay(), even though
the ring buffer has not yet been advanced)

---

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

diff --git a/ext/pulse/pulsesink.c b/ext/pulse/pulsesink.c
index 1d74aa2..430d8f2 100644
--- a/ext/pulse/pulsesink.c
+++ b/ext/pulse/pulsesink.c
@@ -896,7 +896,7 @@ gst_pulsesink_write (GstAudioSink * asink, gpointer data, guint length)
         goto unlock_and_fail;
       }
 
-      if (l > 0)
+      if (l >= length)
         break;
 
       if (pulsesink->did_reset)





More information about the Gstreamer-commits mailing list