Commit 688720df authored by Gildas Bazin's avatar Gildas Bazin

* src/input/input.c: fixed segfault with sub autodetection.

parent 7a879adc
...@@ -804,7 +804,7 @@ static int Init( input_thread_t * p_input, vlc_bool_t b_quick ) ...@@ -804,7 +804,7 @@ static int Init( input_thread_t * p_input, vlc_bool_t b_quick )
p_input->input.p_item->psz_uri ); p_input->input.p_item->psz_uri );
input_source_t *sub; input_source_t *sub;
for( i = 0; subs[i] != NULL; i++ ) for( i = 0; subs && subs[i]; i++ )
{ {
if( strcmp( psz_subtitle, subs[i] ) ) if( strcmp( psz_subtitle, subs[i] ) )
{ {
...@@ -817,8 +817,8 @@ static int Init( input_thread_t * p_input, vlc_bool_t b_quick ) ...@@ -817,8 +817,8 @@ static int Init( input_thread_t * p_input, vlc_bool_t b_quick )
} }
free( subs[i] ); free( subs[i] );
} }
free( subs ); if( subs ) free( subs );
free( psz_autopath ); if( psz_autopath ) free( psz_autopath );
} }
free( psz_subtitle ); free( psz_subtitle );
......
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