[FFmpeg-cvslog] avcodec/mpegaudio_parser: Delay setting codec_id if it appears wrong
Michael Niedermayer
git at videolan.org
Wed Feb 12 00:18:00 CET 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Feb 12 00:11:16 2014 +0100| [c33351f3e75d13803f8e19676304b405711d38ea] | committer: Michael Niedermayer
avcodec/mpegaudio_parser: Delay setting codec_id if it appears wrong
Fixes mp1/mp3 in mp4 misdetection
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c33351f3e75d13803f8e19676304b405711d38ea
---
libavcodec/mpegaudio_parser.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/mpegaudio_parser.c b/libavcodec/mpegaudio_parser.c
index 7a6411c..3d9e946 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;
More information about the ffmpeg-cvslog
mailing list