--- libavcodec/adpcm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c index 22b5468..07ebce8 100644 --- a/libavcodec/adpcm.c +++ b/libavcodec/adpcm.c @@ -637,7 +637,7 @@ static int get_nb_samples(AVCodecContext *avctx, GetByteContext *gb, } case AV_CODEC_ID_ADPCM_THP: if (avctx->extradata) { - nb_samples = buf_size / (8 * ch) * 14; + nb_samples = buf_size * 14 / (8 * ch); break; } has_coded_samples = 1; @@ -1472,6 +1472,9 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, } } } + + // Consume trailing padding + bytestream2_skip(&gb, bytestream2_get_bytes_left(&gb)); break; } case AV_CODEC_ID_ADPCM_DTK: -- 2.4.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel