Commit eeb51429 authored by Christophe Massiot's avatar Christophe Massiot

* src/stream_output/stream_output.c: Use strtol for option parsing instead

  of atoi, because atoi assumes base 10.
* modules/access/dvb/access.c: New --dvb-caching option.
* modules/mux/mpeg/ts.c: Cosmetics.
parent da6ecee0
......@@ -71,6 +71,11 @@ static void CloseProgram( input_thread_t * p_input );
/*****************************************************************************
* Module descriptor
*****************************************************************************/
#define CACHING_TEXT N_("Caching value in ms")
#define CACHING_LONGTEXT N_( \
"Allows you to modify the default caching value for dvb streams. This " \
"value should be set in millisecond units." )
#define PROGRAM_TEXT N_("Program to decode")
#define PROGRAM_LONGTEXT N_("This is a workaround for a bug in the input")
......@@ -143,6 +148,8 @@ static void CloseProgram( input_thread_t * p_input );
vlc_module_begin();
set_description( N_("DVB input with v4l2 support") );
add_integer( "dvb-caching", DEFAULT_PTS_DELAY / 1000, NULL, CACHING_TEXT,
CACHING_LONGTEXT, VLC_TRUE );
add_integer( "dvb-adapter", 0, NULL, ADAPTER_TEXT, ADAPTER_LONGTEXT,
VLC_FALSE );
add_integer( "dvb-device", 0, NULL, DEVICE_TEXT, DEVICE_LONGTEXT,
......@@ -251,6 +258,10 @@ static int Open( vlc_object_t *p_this )
return( -1 );
}
var_Create( p_input, "dvb-caching", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
var_Get( p_input, "dvb-caching", &val );
p_input->i_pts_delay = val.i_int * 1000;
var_Create( p_input, "dvb-adapter", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
var_Create( p_input, "dvb-device", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
var_Create( p_input, "dvb-frequency", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
......
......@@ -412,7 +412,7 @@ static int Open( vlc_object_t *p_this )
if( p_sys->i_shaping_delay <= 0 )
{
msg_Err( p_mux,
"invalid shaping ("I64Fd"ms) reseting to 200ms",
"invalid shaping ("I64Fd"ms) resetting to 200ms",
p_sys->i_shaping_delay / 1000 );
p_sys->i_shaping_delay = 200000;
}
......@@ -423,7 +423,7 @@ static int Open( vlc_object_t *p_this )
p_sys->i_pcr_delay >= p_sys->i_shaping_delay )
{
msg_Err( p_mux,
"invalid pcr delay ("I64Fd"ms) reseting to 30ms",
"invalid pcr delay ("I64Fd"ms) resetting to 30ms",
p_sys->i_pcr_delay / 1000 );
p_sys->i_pcr_delay = 30000;
}
......
......@@ -970,7 +970,8 @@ void __sout_ParseCfg( vlc_object_t *p_this, char *psz_prefix,
val.b_bool = b_yes;
break;
case VLC_VAR_INTEGER:
val.i_int = atoi( cfg->psz_value ? cfg->psz_value : "0" );
val.i_int = strtol( cfg->psz_value ? cfg->psz_value : "0",
NULL, 0 );
break;
case VLC_VAR_FLOAT:
val.f_float = atof( cfg->psz_value ? cfg->psz_value : "0" );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment