summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRodger Combs <rodger.combs@gmail.com>2015-06-24 07:58:15 -0500
committerMichael Niedermayer <michaelni@gmx.at>2015-06-28 16:42:25 +0200
commit7d0a19757e0b2e49e9b8bcb04bddbdeefa1bc61e (patch)
tree2e595a6710a5aed53404508a839bf7f5181604b0
parentf76d7d4b01e843455978f2a90b1fc3c5c4bc0783 (diff)
lavc/adpcm: THP: set approx_nb_samples correctly
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/adpcm.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c
index bad0be4627..2dac23bfa8 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;