[FFmpeg-cvslog] lavc: handle MP3 in get_audio_frame_duration()
Anton Khirnov
git at videolan.org
Mon Apr 17 14:59:44 EEST 2017
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Fri Dec 2 13:21:02 2016 +0100| [0309ddcfb25fd44883bfcdb07509eb4907576b97] | committer: Anton Khirnov
lavc: handle MP3 in get_audio_frame_duration()
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0309ddcfb25fd44883bfcdb07509eb4907576b97
---
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) {
More information about the ffmpeg-cvslog
mailing list