]> git.sesse.net Git - vlc/commitdiff
Fixed segfault if more than 1 subtitle has been detected and you have not
authorLaurent Aimar <fenrir@videolan.org>
Sat, 29 Sep 2007 15:40:26 +0000 (15:40 +0000)
committerLaurent Aimar <fenrir@videolan.org>
Sat, 29 Sep 2007 15:40:26 +0000 (15:40 +0000)
selected one with --sub-file

src/input/input.c

index be0d9852411800e33cde83afc4a7b24ff5ad56d3..859e16fc51f731a973fbcfcaf9b95af3e7c88a2a 100644 (file)
@@ -1029,7 +1029,7 @@ static int Init( input_thread_t * p_input )
             /* Then, just add the following subtitles files */
             for( ; subs && subs[i]; i++ )
             {
-                if( strcmp( psz_subtitle, subs[i] ) )
+                if( !psz_subtitle || strcmp( psz_subtitle, subs[i] ) )
                 {
                     sub = InputSourceNew( p_input );
                     if( !InputSourceInit( p_input, sub, subs[i], "subtitle" ) )