lavc/adpcm: THP: set approx_nb_samples correctly
authorRodger Combs <rodger.combs@gmail.com>
Wed, 24 Jun 2015 12:58:15 +0000 (07:58 -0500)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 28 Jun 2015 14:42:25 +0000 (16:42 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/adpcm.c

index bad0be4..2dac23b 100644 (file)
@@ -654,11 +654,9 @@ static int get_nb_samples(AVCodecContext *avctx, GetByteContext *gb,
         buf_size       -= 8 + 36 * ch;
         buf_size       /= ch;
         nb_samples      = buf_size / 8 * 14;
-        if (buf_size % 8 > 1) {
+        if (buf_size % 8 > 1)
             nb_samples     += (buf_size % 8 - 1) * 2;
-            if (*coded_samples & 1)
-                nb_samples -= 1;
-        }
+        *approx_nb_samples = 1;
         break;
     case AV_CODEC_ID_ADPCM_AFC:
         nb_samples = buf_size / (9 * ch) * 16;