[FFmpeg-cvslog] avcodec/mpegaudio_parser: treat codec_id like the other parameters
Michael Niedermayer
git at videolan.org
Wed Feb 12 00:17:59 CET 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Feb 11 23:58:39 2014 +0100| [5669ae84016f766a7632de29f014294f140513cb] | committer: Michael Niedermayer
avcodec/mpegaudio_parser: treat codec_id like the other parameters
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5669ae84016f766a7632de29f014294f140513cb
---
libavcodec/mpegaudio_parser.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavcodec/mpegaudio_parser.c b/libavcodec/mpegaudio_parser.c
index 4081936..7a6411c 100644
--- a/libavcodec/mpegaudio_parser.c
+++ b/libavcodec/mpegaudio_parser.c
@@ -64,10 +64,11 @@ static int mpegaudio_parse(AVCodecParserContext *s1,
}else{
while(i<buf_size){
int ret, sr, channels, bit_rate, frame_size;
+ enum AVCodecID codec_id;
state= (state<<8) + buf[i++];
- ret = avpriv_mpa_decode_header(avctx, state, &sr, &channels, &frame_size, &bit_rate);
+ ret = avpriv_mpa_decode_header2(state, &sr, &channels, &frame_size, &bit_rate, &codec_id);
if (ret < 4) {
if (i > 4)
s->header_count = -2;
@@ -82,6 +83,7 @@ static int mpegaudio_parse(AVCodecParserContext *s1,
avctx->sample_rate= sr;
avctx->channels = channels;
s1->duration = frame_size;
+ avctx->codec_id = codec_id;
if (s->no_bitrate || !avctx->bit_rate) {
s->no_bitrate = 1;
avctx->bit_rate += (bit_rate - avctx->bit_rate) / s->header_count;
More information about the ffmpeg-cvslog
mailing list