summaryrefslogtreecommitdiff
path: root/libavcodec/mpegaudio_parser.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-02-12 00:11:16 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-02-12 00:11:16 +0100
commitc33351f3e75d13803f8e19676304b405711d38ea (patch)
tree0e1c4a7a0a2c0c6edc8ab26fa77dfc20b9932d07 /libavcodec/mpegaudio_parser.c
parent5669ae84016f766a7632de29f014294f140513cb (diff)
avcodec/mpegaudio_parser: Delay setting codec_id if it appears wrong
Fixes mp1/mp3 in mp4 misdetection Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpegaudio_parser.c')
-rw-r--r--libavcodec/mpegaudio_parser.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mpegaudio_parser.c b/libavcodec/mpegaudio_parser.c
index 7a6411ca63..3d9e94688a 100644
--- a/libavcodec/mpegaudio_parser.c
+++ b/libavcodec/mpegaudio_parser.c
@@ -79,7 +79,7 @@ static int mpegaudio_parse(AVCodecParserContext *s1,
s->header_count++;
s->frame_size = ret-4;
- if (s->header_count > 0) {
+ if (s->header_count > 0 + (avctx->codec_id != AV_CODEC_ID_NONE && avctx->codec_id != codec_id)) {
avctx->sample_rate= sr;
avctx->channels = channels;
s1->duration = frame_size;