[FFmpeg-cvslog] lavc/adpcm: THP: set approx_nb_samples correctly

Rodger Combs git at videolan.org
Sun Jun 28 16:50:45 CEST 2015


ffmpeg | branch: master | Rodger Combs <rodger.combs at gmail.com> | Wed Jun 24 07:58:15 2015 -0500| [7d0a19757e0b2e49e9b8bcb04bddbdeefa1bc61e] | committer: Michael Niedermayer

lavc/adpcm: THP: set approx_nb_samples correctly

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7d0a19757e0b2e49e9b8bcb04bddbdeefa1bc61e
---

 libavcodec/adpcm.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c
index bad0be4..2dac23b 100644
--- a/libavcodec/adpcm.c
+++ b/libavcodec/adpcm.c
@@ -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;



More information about the ffmpeg-cvslog mailing list