[FFmpeg-cvslog] mpegaudio_parser: fix off by 1 error
Michael Niedermayer
git at videolan.org
Thu Mar 14 04:47:35 CET 2013
ffmpeg | branch: release/1.1 | Michael Niedermayer <michaelni at gmx.at> | Thu Mar 14 04:41:26 2013 +0100| [f156dc54f8c285ec2f11cd9cc7e2e0d7c510cb04] | committer: Michael Niedermayer
mpegaudio_parser: fix off by 1 error
See:
commit 29d8cd265a536063420afe78375b2176a9e1abc5
Author: Alexander Kojevnikov <alexander at kojevnikov.com>
Date: Tue Feb 26 21:47:11 2013 -0800
mp3dec: Fix VBR bit rate parsing
When parsing the Xing/Info tag, don't set the bit rate if it's an Info tag.
When parsing the stream, don't override the bit rate if it's already set,
otherwise calculate the mean bit rate from parsed frames. This way, the bit
rate will be set correctly both for CBR and VBR streams.
Signed-off-by: Alexander Kojevnikov <alexander at kojevnikov.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f156dc54f8c285ec2f11cd9cc7e2e0d7c510cb04
---
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 f592d5a..4081936 100644
--- a/libavcodec/mpegaudio_parser.c
+++ b/libavcodec/mpegaudio_parser.c
@@ -78,7 +78,7 @@ static int mpegaudio_parse(AVCodecParserContext *s1,
s->header_count++;
s->frame_size = ret-4;
- if (s->header_count > 1) {
+ if (s->header_count > 0) {
avctx->sample_rate= sr;
avctx->channels = channels;
s1->duration = frame_size;
More information about the ffmpeg-cvslog
mailing list