Properly handle SILENCE frame. Patch by Kenan Gillet.
authorKenan Gillet <kenan.gillet@gmail.com>
Mon, 4 May 2009 03:25:57 +0000 (03:25 +0000)
committerReynaldo H. Verdejo Pinochet <reynaldo@opendot.cl>
Mon, 4 May 2009 03:25:57 +0000 (03:25 +0000)
Originally committed as revision 18734 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/qcelpdec.c

index eff57cf..68b9d2c 100644 (file)
@@ -249,7 +249,7 @@ static void decode_gain_and_index(QCELPContext  *q,
             gain[2] =     gain[1];
             gain[1] = 0.6*gain[0] + 0.4*gain[1];
         }
-    }else
+    }else if (q->bitrate != SILENCE)
     {
         if(q->bitrate == RATE_OCTAVE)
         {