]> git.sesse.net Git - vlc/commitdiff
Keep p_input->i_state when adding a subtitle on the fly. This prevents i_state from...
authorAntoine Cellerier <dionoea@videolan.org>
Sat, 23 Aug 2008 14:33:54 +0000 (16:33 +0200)
committerAntoine Cellerier <dionoea@videolan.org>
Sat, 23 Aug 2008 14:37:45 +0000 (16:37 +0200)
src/input/input.c

index 971284bcf013e2a7d7b96438c8549eeeee4ea63e..89f5216301ad6c30df954849519aec5b21a8524c 100644 (file)
@@ -2813,6 +2813,8 @@ bool input_AddSubtitles( input_thread_t *p_input, char *psz_subtitle,
     vlc_value_t list;
     char *psz_path, *psz_extension;
 
+    int i_state = p_input->i_state;
+
     if( b_check_extension && !subtitles_Filter( psz_subtitle ) )
     {
         return false;
@@ -2862,6 +2864,7 @@ bool input_AddSubtitles( input_thread_t *p_input, char *psz_subtitle,
             }
             var_Change( p_input, "spu-es", VLC_VAR_FREELIST, &list, NULL );
         }
+        input_ChangeState( p_input, i_state );
     }
     else free( sub );