lavc: handle MP3 in get_audio_frame_duration()

This commit is contained in:
Anton Khirnov 2016-12-02 13:21:02 +01:00
parent 6aa4ba7131
commit 0309ddcfb2
1 changed files with 3 additions and 0 deletions

View File

@ -1186,6 +1186,9 @@ static int get_audio_frame_duration(enum AVCodecID id, int sr, int ch, int ba,
if (id == AV_CODEC_ID_BINKAUDIO_DCT)
return (480 << (sr / 22050)) / ch;
}
if (id == AV_CODEC_ID_MP3)
return sr <= 24000 ? 576 : 1152;
}
if (ba > 0) {