From ff913fa6f91dbe17972f39017cb766d517ecf044 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Tue, 15 Aug 2023 15:51:10 +0200 Subject: [PATCH 2/4] avcodec/utils: fix duration for ADPCM_MS Signed-off-by: Paul B Mahol --- libavcodec/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index bd4131db62..61e2946c16 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -740,7 +740,7 @@ static int get_audio_frame_duration(enum AVCodecID id, int sr, int ch, int ba, tmp = blocks * ((ba - 4LL * ch) * 2 / ch); break; case AV_CODEC_ID_ADPCM_MS: - tmp = blocks * (2 + (ba - 7LL * ch) * 2LL / ch); + tmp = blocks * ((ba - 6LL * ch) * 2LL / ch); break; case AV_CODEC_ID_ADPCM_MTAF: tmp = blocks * (ba - 16LL) * 2 / ch; -- 2.39.1