changeset 23957:74eb6825d332

allow to specify the audio bitrate in bits (some codecs need that ...)
author michael
date Tue, 31 Jul 2007 17:51:39 +0000
parents a0d1fe96bdb8
children 5de922dc2ddd
files libmpcodecs/ae_lavc.c libmpcodecs/ve_lavc.c
diffstat 2 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/ae_lavc.c	Tue Jul 31 17:28:47 2007 +0000
+++ b/libmpcodecs/ae_lavc.c	Tue Jul 31 17:51:39 2007 +0000
@@ -201,7 +201,10 @@
 	// 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;
 	
 
 	/*
--- a/libmpcodecs/ve_lavc.c	Tue Jul 31 17:28:47 2007 +0000
+++ b/libmpcodecs/ve_lavc.c	Tue Jul 31 17:51:39 2007 +0000
@@ -166,7 +166,7 @@
 #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},