Commit f63268ac authored by Rémi Duraffort's avatar Rémi Duraffort

input: Fix a memleak.

parent 9d8178b9
...@@ -1107,13 +1107,11 @@ static void InitPrograms( input_thread_t * p_input ) ...@@ -1107,13 +1107,11 @@ static void InitPrograms( input_thread_t * p_input )
/* Set up es_out */ /* Set up es_out */
es_out_Control( p_input->p->p_es_out, ES_OUT_SET_ACTIVE, true ); es_out_Control( p_input->p->p_es_out, ES_OUT_SET_ACTIVE, true );
i_es_out_mode = ES_OUT_MODE_AUTO; i_es_out_mode = ES_OUT_MODE_AUTO;
val.p_list = NULL;
if( p_input->p->p_sout ) if( p_input->p->p_sout )
{ {
if( var_GetBool( p_input, "sout-all" ) ) if( var_GetBool( p_input, "sout-all" ) )
{ {
i_es_out_mode = ES_OUT_MODE_ALL; i_es_out_mode = ES_OUT_MODE_ALL;
val.p_list = NULL;
} }
else else
{ {
...@@ -1125,8 +1123,7 @@ static void InitPrograms( input_thread_t * p_input ) ...@@ -1125,8 +1123,7 @@ static void InitPrograms( input_thread_t * p_input )
} }
else else
{ {
var_Change( p_input, "programs", VLC_VAR_FREELIST, &val, var_Change( p_input, "programs", VLC_VAR_FREELIST, &val, NULL );
NULL );
} }
} }
} }
...@@ -1141,6 +1138,7 @@ static void InitPrograms( input_thread_t * p_input ) ...@@ -1141,6 +1138,7 @@ static void InitPrograms( input_thread_t * p_input )
{ {
demux_Control( p_input->p->input.p_demux, DEMUX_SET_GROUP, -1, demux_Control( p_input->p->input.p_demux, DEMUX_SET_GROUP, -1,
val.p_list ); val.p_list );
var_Change( p_input, "programs", VLC_VAR_FREELIST, &val, NULL );
} }
else else
{ {
......
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