[MPlayer-cvslog] r23977 - in trunk/libmpcodecs: ae_lavc.c ve_lavc.c

michael subversion at mplayerhq.hu
Tue Jul 31 19:51:39 CEST 2007


Author: michael
Date: Tue Jul 31 19:51:39 2007
New Revision: 23977

Log:
allow to specify the audio bitrate in bits (some codecs need that ...)


Modified:
   trunk/libmpcodecs/ae_lavc.c
   trunk/libmpcodecs/ve_lavc.c

Modified: trunk/libmpcodecs/ae_lavc.c
==============================================================================
--- trunk/libmpcodecs/ae_lavc.c	(original)
+++ trunk/libmpcodecs/ae_lavc.c	Tue Jul 31 19:51:39 2007
@@ -201,7 +201,10 @@ int mpae_init_lavc(audio_encoder_t *enco
 	// put sample parameters
 	lavc_actx->channels = encoder->params.channels;
 	lavc_actx->sample_rate = encoder->params.sample_rate;
-	lavc_actx->bit_rate = encoder->params.bitrate = lavc_param_abitrate * 1000;
+        if(lavc_param_abitrate<1000)
+                lavc_actx->bit_rate = encoder->params.bitrate = lavc_param_abitrate * 1000;
+        else
+                lavc_actx->bit_rate = encoder->params.bitrate = lavc_param_abitrate;
 	
 
 	/*

Modified: trunk/libmpcodecs/ve_lavc.c
==============================================================================
--- trunk/libmpcodecs/ve_lavc.c	(original)
+++ trunk/libmpcodecs/ve_lavc.c	Tue Jul 31 19:51:39 2007
@@ -166,7 +166,7 @@ int lavc_param_audio_global_header= 0;
 #ifdef USE_LIBAVCODEC
 m_option_t lavcopts_conf[]={
 	{"acodec", &lavc_param_acodec, CONF_TYPE_STRING, 0, 0, 0, NULL},
-	{"abitrate", &lavc_param_abitrate, CONF_TYPE_INT, CONF_RANGE, 1, 1000, NULL},
+	{"abitrate", &lavc_param_abitrate, CONF_TYPE_INT, CONF_RANGE, 1, 1000000, NULL},
 	{"atag", &lavc_param_atag, CONF_TYPE_INT, CONF_RANGE, 0, 0xffff, NULL},
 	{"vcodec", &lavc_param_vcodec, CONF_TYPE_STRING, 0, 0, 0, NULL},
 	{"vbitrate", &lavc_param_vbitrate, CONF_TYPE_INT, CONF_RANGE, 4, 24000000, NULL},



More information about the MPlayer-cvslog mailing list