From 0309ddcfb25fd44883bfcdb07509eb4907576b97 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Fri, 2 Dec 2016 13:21:02 +0100 Subject: [PATCH] lavc: handle MP3 in get_audio_frame_duration() --- libavcodec/utils.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 0b44bb6464..5350eb819a 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -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) {