summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2016-12-02 13:21:02 +0100
committerAnton Khirnov <anton@khirnov.net>2016-12-14 09:06:44 +0100
commit0309ddcfb25fd44883bfcdb07509eb4907576b97 (patch)
tree14856f6f70632ecade8e23f1d69fd239a022c1b6 /libavcodec
parent6aa4ba7131b6e8668e33430e18101a051fe492eb (diff)
lavc: handle MP3 in get_audio_frame_duration()
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/utils.c3
1 files changed, 3 insertions, 0 deletions
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) {