From 9c89585ad4ad3917ff3abf196a84a687a34eca14 Mon Sep 17 00:00:00 2001 From: Fabrice Bellard Date: Wed, 9 Oct 2002 14:16:31 +0000 Subject: [PATCH] resample fix by Petros Tsantoulis Originally committed as revision 1018 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/resample.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/resample.c b/libavcodec/resample.c index ad857e220c..b80bea3997 100644 --- a/libavcodec/resample.c +++ b/libavcodec/resample.c @@ -75,9 +75,9 @@ static int fractional_resample(ReSampleChannelContext *s, short *output, short * *q++ = (l0 * (FRAC - frac) + l1 * frac) >> FRAC_BITS; frac = frac + s->incr; while (frac >= FRAC) { + frac -= FRAC; if (p >= pend) goto the_end; - frac -= FRAC; l0 = l1; l1 = *p++; }