[FFmpeg-devel] Error in mpegaudio_parser.c
dan6992 at hotmail.com
Tue Apr 7 00:58:59 CEST 2015
I think this line in mpegaudio_parser.c is wrong....
int header_threshold = avctx->codec_id != AV_CODEC_ID_NONE && avctx->codec_id != codec_id;
I believe it should be...
int header_threshold = avctx->codec_id != AV_CODEC_ID_NONE && avctx->codec_id == codec_id;
I believe the intention of the line is to skip setting the params if they were already set correctly by the container demuxer. However the current code skips the setting of the params when the codec_ids do not match rather then when they do, which is incorrect.
I have a file which is an MP4 with MP2 audio. The demuxer sets the codec_id to MP3. With the current code the parser skips over setting the params and leaves the codec_id set to MP3, which is incorrect. If I make the change I suggested then it works correctly.
More information about the ffmpeg-devel