summaryrefslogtreecommitdiff
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2020-08-25 00:51:11 +0200
committerPaul B Mahol <onemda@gmail.com>2020-09-03 18:06:50 +0200
commita1caa16d45b321e669efdcce67f4027e532c90d1 (patch)
tree1b95a97827e3d72b59eea13bcdfbbb2562d52b5a /libavcodec/utils.c
parent2d16b6bd3e18f31dbd53f10e337d13ddb4ba6ba0 (diff)
avcodec: add ADPCM IMA MOFLEX decoder
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 14cb5cf1aa..187ce230b8 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -1664,6 +1664,8 @@ static int get_audio_frame_duration(enum AVCodecID id, int sr, int ch, int ba,
if (ch > 0 && ch < INT_MAX/16) {
/* calc from frame_bytes and channels */
switch (id) {
+ case AV_CODEC_ID_ADPCM_IMA_MOFLEX:
+ return (frame_bytes - 4 * ch) / (128 * ch) * 256;
case AV_CODEC_ID_ADPCM_AFC:
return frame_bytes / (9 * ch) * 16;
case AV_CODEC_ID_ADPCM_PSX: