From 877a45b7915fb1d3c58347a6dc39e18f6647752f Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 24 Mar 2008 11:24:22 +0000 Subject: [PATCH] gst-libs/gst/audio/gstaudiosink.c: Small debug improvement. Original commit message from CVS: * gst-libs/gst/audio/gstaudiosink.c: (gst_audioringbuffer_release): Small debug improvement. * gst-libs/gst/audio/gstbaseaudiosink.c: (gst_base_audio_sink_render): Fix bug in determining the sample start/stop position, we want to base this decision on the fact that we are going forwards or backwards, not slower or faster. This fixes some ugly resync warnings when playing at very slow speeds. --- ChangeLog | 12 ++++++++++++ gst-libs/gst/audio/gstaudiosink.c | 2 ++ gst-libs/gst/audio/gstbaseaudiosink.c | 4 ++-- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index b01c671ad0..9b20ae9dfa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2008-03-24 Wim Taymans + + * gst-libs/gst/audio/gstaudiosink.c: (gst_audioringbuffer_release): + Small debug improvement. + + * gst-libs/gst/audio/gstbaseaudiosink.c: + (gst_base_audio_sink_render): + Fix bug in determining the sample start/stop position, we want to base + this decision on the fact that we are going forwards or backwards, not + slower or faster. This fixes some ugly resync warnings when playing at + very slow speeds. + 2008-03-23 Sebastian Dröge * ext/gio/gstgio.c: (gst_gio_get_supported_protocols): diff --git a/gst-libs/gst/audio/gstaudiosink.c b/gst-libs/gst/audio/gstaudiosink.c index 2ad0c42c2a..f37bd55c4d 100644 --- a/gst-libs/gst/audio/gstaudiosink.c +++ b/gst-libs/gst/audio/gstaudiosink.c @@ -422,6 +422,8 @@ gst_audioringbuffer_release (GstRingBuffer * buf) if (!result) goto could_not_unprepare; + GST_DEBUG_OBJECT (sink, "unprepared"); + return result; could_not_unprepare: diff --git a/gst-libs/gst/audio/gstbaseaudiosink.c b/gst-libs/gst/audio/gstbaseaudiosink.c index 5f29b7fb1f..4bd5cfda8a 100644 --- a/gst-libs/gst/audio/gstbaseaudiosink.c +++ b/gst-libs/gst/audio/gstbaseaudiosink.c @@ -1160,7 +1160,7 @@ gst_base_audio_sink_render (GstBaseSink * bsink, GstBuffer * buf) /* positive playback rate, first sample is render_start, negative rate, first * sample is render_stop */ - if (bsink->segment.rate >= 1.0) + if (bsink->segment.rate >= 0.0) sample_offset = render_start; else sample_offset = render_stop; @@ -1211,7 +1211,7 @@ no_align: no_sync: /* we render the first or last sample first, depending on the rate */ - if (bsink->segment.rate >= 1.0) + if (bsink->segment.rate >= 0.0) sample_offset = render_start; else sample_offset = render_stop;