From 5a3370816fc9549a742c7c458337bd9489804ac0 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Mon, 26 Nov 2012 11:59:44 +0000 Subject: [PATCH] av_get_audio_frame_duration: add ADPCM_AFC Signed-off-by: Paul B Mahol --- libavcodec/utils.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 6a5c735160..32bda51eb4 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -2465,6 +2465,8 @@ int av_get_audio_frame_duration(AVCodecContext *avctx, int frame_bytes) if (ch > 0) { /* calc from frame_bytes and channels */ switch (id) { + case AV_CODEC_ID_ADPCM_AFC: + return frame_bytes / (9 * ch) * 16; case AV_CODEC_ID_ADPCM_4XM: case AV_CODEC_ID_ADPCM_IMA_ISS: return (frame_bytes - 4 * ch) * 2 / ch;