From c276af0471f9e90d48470a7dbd6c433282953da3 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 10 Mar 2004 00:43:24 +0000 Subject: disable lames leading zero "feature", fixes a few more flv encoding issues Originally committed as revision 2865 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/mp3lameaudio.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'libavcodec') diff --git a/libavcodec/mp3lameaudio.c b/libavcodec/mp3lameaudio.c index 0a121eb4b6..c8ee975eed 100644 --- a/libavcodec/mp3lameaudio.c +++ b/libavcodec/mp3lameaudio.c @@ -51,6 +51,7 @@ static int MP3lame_encode_init(AVCodecContext *avctx) /* lame 3.91 doesn't work in mono */ lame_set_mode(s->gfp, JOINT_STEREO); lame_set_brate(s->gfp, avctx->bit_rate/1000); + lame_set_bWriteVbrTag(s->gfp,0); if (lame_init_params(s->gfp) < 0) goto err_close; @@ -71,7 +72,10 @@ int MP3lame_encode_frame(AVCodecContext *avctx, unsigned char *frame, int buf_size, void *data) { Mp3AudioContext *s = avctx->priv_data; - int num; + int num, i; +//av_log(avctx, AV_LOG_DEBUG, "%X %d %X\n", (int)frame, buf_size, (int)data); +// if(data==NULL) +// return lame_encode_flush(s->gfp, frame, buf_size); /* lame 3.91 dies on '1-channel interleaved' data */ if (s->stereo) { @@ -80,6 +84,11 @@ int MP3lame_encode_frame(AVCodecContext *avctx, } else { num = lame_encode_buffer(s->gfp, data, data, MPA_FRAME_SIZE, frame, buf_size); + +/*av_log(avctx, AV_LOG_DEBUG, "in:%d out:%d\n", MPA_FRAME_SIZE, num); +for(i=0; i