changeset 1871:9457292b0b65 libavcodec

disable lames leading zero "feature", fixes a few more flv encoding issues
author michael
date Wed, 10 Mar 2004 00:43:24 +0000
parents d493ce1c4497
children c13d3543c73a
files mp3lameaudio.c
diffstat 1 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mp3lameaudio.c	Tue Mar 09 15:23:14 2004 +0000
+++ b/mp3lameaudio.c	Wed Mar 10 00:43:24 2004 +0000
@@ -51,6 +51,7 @@
 	/* 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 @@
                      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 @@
 	} 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;