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.
This commit is contained in:
Wim Taymans 2008-03-24 11:24:22 +00:00
parent fb3216d720
commit 877a45b791
3 changed files with 16 additions and 2 deletions

View file

@ -1,3 +1,15 @@
2008-03-24 Wim Taymans <wim.taymans@collabora.co.uk>
* 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 <slomo@circular-chaos.org>
* ext/gio/gstgio.c: (gst_gio_get_supported_protocols):

View file

@ -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:

View file

@ -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;