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 be0d985..859e16f 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" ) )