avcodec: add FastAudio decoder

This commit is contained in:
Paul B Mahol 2020-08-24 19:11:41 +02:00
parent a1caa16d45
commit 1304078d3c
8 changed files with 214 additions and 1 deletions

View file

@ -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: