diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2004-03-10 03:43:24 +0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-03-10 03:43:24 +0300 |
commit | c276af0471f9e90d48470a7dbd6c433282953da3 (patch) | |
tree | cb2745dcb17899db5e91c3634d17ba4e0711d9cc /libavcodec/mp3lameaudio.c | |
parent | 4bfc029f83491437fc3300703ea5851d2c5355ab (diff) |
disable lames leading zero "feature", fixes a few more flv encoding issues
Originally committed as revision 2865 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mp3lameaudio.c')
-rw-r--r-- | libavcodec/mp3lameaudio.c | 11 |
1 files changed, 10 insertions, 1 deletions
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<num; i++){ + av_log(avctx, AV_LOG_DEBUG, "%2X ", frame[i]); +}*/ } return num; |