[gst-cvs] gst-plugins-base: ringbuffer: handle border cases in resampler
Wim Taymans
wtay at kemper.freedesktop.org
Thu Jun 11 10:13:58 PDT 2009
Module: gst-plugins-base
Branch: master
Commit: a9c82f94721d323ca86c69b9ed529e04add546c4
URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=a9c82f94721d323ca86c69b9ed529e04add546c4
Author: Wim Taymans <wim.taymans at collabora.co.uk>
Date: Thu Jun 11 19:12:51 2009 +0200
ringbuffer: handle border cases in resampler
---
gst-libs/gst/audio/gstringbuffer.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gst-libs/gst/audio/gstringbuffer.c b/gst-libs/gst/audio/gstringbuffer.c
index 5aca46f..920a2be 100644
--- a/gst-libs/gst/audio/gstringbuffer.c
+++ b/gst-libs/gst/audio/gstringbuffer.c
@@ -1503,7 +1503,7 @@ G_STMT_START { \
memcpy (d, se, bps); \
se -= bps; \
*accum += outr; \
- while ((*accum << 1) >= inr) { \
+ while (d < de && (*accum << 1) >= inr) { \
*accum -= inr; \
d += bps; \
} \
@@ -1521,7 +1521,7 @@ G_STMT_START { \
memcpy (d, se, bps); \
d += bps; \
*accum += inr; \
- while ((*accum << 1) >= outr) { \
+ while (s <= se && (*accum << 1) >= outr) { \
*accum -= outr; \
se -= bps; \
} \
More information about the Gstreamer-commits
mailing list