summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Bœsch <u@pkh.me>2017-04-17 13:57:08 +0200
committerClément Bœsch <u@pkh.me>2017-04-17 13:57:08 +0200
commitb5a42c7f098a0eaee9cb08ce8b26b0c9a307d9c4 (patch)
treeda9b5eb8a99dfa90d03512d539e1c644be737fb9
parent5eba94a8c392be44a868183cdacff9a38fe55448 (diff)
parent0309ddcfb25fd44883bfcdb07509eb4907576b97 (diff)
Merge commit '0309ddcfb25fd44883bfcdb07509eb4907576b97'
* commit '0309ddcfb25fd44883bfcdb07509eb4907576b97': lavc: handle MP3 in get_audio_frame_duration() Merged-by: Clément Bœsch <u@pkh.me>
-rw-r--r--libavcodec/utils.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index ae245c833e..56e58cc426 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -1691,6 +1691,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) {