summaryrefslogtreecommitdiff
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2020-08-24 19:11:41 +0200
committerPaul B Mahol <onemda@gmail.com>2020-09-03 18:07:58 +0200
commit1304078d3c45fab0234861d11c9e5890d3270699 (patch)
tree20d6a2bbbdb3f9c512720193a04b5c2b29f7eb23 /libavcodec/utils.c
parenta1caa16d45b321e669efdcce67f4027e532c90d1 (diff)
avcodec: add FastAudio 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 187ce230b8..2e5185f364 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_FASTAUDIO:
+ return frame_bytes / (40 * ch) * 256;
case AV_CODEC_ID_ADPCM_IMA_MOFLEX:
return (frame_bytes - 4 * ch) / (128 * ch) * 256;
case AV_CODEC_ID_ADPCM_AFC: