Commit 4e490475 authored by Francois Cartegnie's avatar Francois Cartegnie

input: do not allow negative input-repeat

Was going into infinite loop in that case.
refs #14389
parent adbdc6ba
......@@ -609,7 +609,7 @@ static void MainLoopDemux( input_thread_t *p_input, bool *pb_changed, mtime_t i_
static int MainLoopTryRepeat( input_thread_t *p_input, mtime_t *pi_start_mdate )
{
int i_repeat = var_GetInteger( p_input, "input-repeat" );
if( i_repeat == 0 )
if( i_repeat <= 0 )
return VLC_EGENERIC;
vlc_value_t val;
......
......@@ -1686,6 +1686,7 @@ vlc_module_begin ()
set_section( N_( "Playback control" ) , NULL)
add_integer( "input-repeat", 0,
INPUT_REPEAT_TEXT, INPUT_REPEAT_LONGTEXT, false )
change_integer_range( 0, 65535 )
change_safe ()
add_float( "start-time", 0,
START_TIME_TEXT, START_TIME_LONGTEXT, true )
......
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