* Fix a problem with the first sample when down sampling.
authorPhilip Gladstone <philipjsg@users.sourceforge.net>
Thu, 9 May 2002 01:23:49 +0000 (01:23 +0000)
committerPhilip Gladstone <philipjsg@users.sourceforge.net>
Thu, 9 May 2002 01:23:49 +0000 (01:23 +0000)
* Note that this code needs to be fixed -- the rate conversion from 48000->44100
  sounds horrible!

Originally committed as revision 471 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/resample.c

index 94e3a560e18022481111b908104c22b1db8cc91c..78b4ad812667e7f91b16447d460a6a3cf4e87329 100644 (file)
@@ -48,7 +48,7 @@ static void init_mono_resample(ReSampleChannelContext *s, float ratio)
     if (s->iratio == 0)
         s->iratio = 1;
     s->incr = (int)((ratio / s->iratio) * FRAC);
-    s->frac = 0;
+    s->frac = FRAC;
     s->last_sample = 0;
     s->icount = s->iratio;
     s->isum = 0;