changeset 5922:30eea1bd1b64

fixed bogus overloaded "q" parameter for lame mp3 encoding
author rfelker
date Wed, 01 May 2002 14:42:42 +0000
parents 20ccb89222bc
children 4241047fb315
files cfg-mencoder.h mencoder.c
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/cfg-mencoder.h	Wed May 01 14:15:05 2002 +0000
+++ b/cfg-mencoder.h	Wed May 01 14:42:42 2002 +0000
@@ -23,6 +23,7 @@
 #ifdef HAVE_MP3LAME
 struct config lameopts_conf[]={
 	{"q", &lame_param_quality, CONF_TYPE_INT, CONF_RANGE, 0, 9, NULL},
+	{"aq", &lame_param_algqual, CONF_TYPE_INT, CONF_RANGE, 0, 9, NULL},
 	{"vbr", &lame_param_vbr, CONF_TYPE_INT, CONF_RANGE, 0, vbr_max_indicator, NULL},
 	{"cbr", &lame_param_vbr, CONF_TYPE_FLAG, 0, 0, 0, NULL},
 	{"abr", &lame_param_vbr, CONF_TYPE_FLAG, 0, 0, vbr_abr, NULL},
--- a/mencoder.c	Wed May 01 14:15:05 2002 +0000
+++ b/mencoder.c	Wed May 01 14:42:42 2002 +0000
@@ -181,6 +181,7 @@
 
 #ifdef HAVE_MP3LAME
 int lame_param_quality=0; // best
+int lame_param_algqual=5; // same as old default
 int lame_param_vbr=vbr_default;
 int lame_param_mode=-1; // unset
 int lame_param_padding=-1; // unset
@@ -749,12 +750,12 @@
 lame_set_in_samplerate(lame,sh_audio->samplerate);
 lame_set_num_channels(lame,mux_a->wf->nChannels);
 lame_set_out_samplerate(lame,mux_a->wf->nSamplesPerSec);
+lame_set_quality(lame,lame_param_algqual); // 0 = best q
 if(lame_param_vbr){  // VBR:
     lame_set_VBR(lame,lame_param_vbr); // vbr mode
     lame_set_VBR_q(lame,lame_param_quality+1); // 1 = best vbr q  6=~128k
     if(lame_param_br>0) lame_set_VBR_mean_bitrate_kbps(lame,lame_param_br);
 } else {    // CBR:
-    lame_set_quality(lame,lame_param_quality); // 0 = best q
     if(lame_param_br>0) lame_set_brate(lame,lame_param_br);
 }
 if(lame_param_mode>=0) lame_set_mode(lame,lame_param_mode); // j-st