Commit c33351f3 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/mpegaudio_parser: Delay setting codec_id if it appears wrong

Fixes mp1/mp3 in mp4 misdetection
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 5669ae84
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment