mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
lavc/adpcm: THP: set approx_nb_samples correctly
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
f76d7d4b01
commit
7d0a19757e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user