mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
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>
This commit is contained in:
parent
5669ae8401
commit
c33351f3e7
@ -79,7 +79,7 @@ static int mpegaudio_parse(AVCodecParserContext *s1,
|
|||||||
s->header_count++;
|
s->header_count++;
|
||||||
s->frame_size = ret-4;
|
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->sample_rate= sr;
|
||||||
avctx->channels = channels;
|
avctx->channels = channels;
|
||||||
s1->duration = frame_size;
|
s1->duration = frame_size;
|
||||||
|
Loading…
Reference in New Issue
Block a user