]> git.sesse.net Git - vlc/blobdiff - src/input/input.c
Use var_Inherit* instead of var_CreateGet*.
[vlc] / src / input / input.c
index f66c0638bdfa058a7490b07404abf43c15374456..35da58bd31014e589b6593654d4653b3310b4210 100644 (file)
@@ -53,6 +53,7 @@
 #include <vlc_charset.h>
 #include <vlc_fs.h>
 #include <vlc_strings.h>
+#include <vlc_modules.h>
 
 #ifdef HAVE_SYS_STAT_H
 #   include <sys/stat.h>
@@ -1167,7 +1168,7 @@ static void InitPrograms( input_thread_t * p_input )
                  prgm = strtok_r( NULL, ",", &buf ) )
             {
                 vlc_value_t val = { .i_int = atoi( prgm ) };
-                TAB_APPEND( list.i_count, list.p_values, val );
+                INSERT_ELEM( list.p_values, list.i_count, list.i_count, val );
             }
 
             if( list.i_count > 0 )
@@ -1193,7 +1194,7 @@ static void InitPrograms( input_thread_t * p_input )
     else
     {
         demux_Control( p_input->p->input.p_demux, DEMUX_SET_GROUP,
-                       (int) var_GetInteger( p_input, "program" ), NULL );
+                       es_out_GetGroupForced( p_input->p->p_es_out ), NULL );
     }
 }
 
@@ -2135,7 +2136,7 @@ static bool Control( input_thread_t *p_input,
 
             if( bookmark.i_time_offset < 0 && bookmark.i_byte_offset < 0 )
             {
-                msg_Err( p_input, "invalid bookmark %d", val.i_int );
+                msg_Err( p_input, "invalid bookmark %"PRId64, val.i_int );
                 break;
             }
 
@@ -3167,7 +3168,7 @@ static void SubtitleAdd( input_thread_t *p_input, char *psz_subtitle, bool b_for
         free( psz_path );
     }
 
-    char *url = make_URI( psz_subtitle );
+    char *url = make_URI( psz_subtitle, "file" );
 
     var_Change( p_input, "spu-es", VLC_VAR_CHOICESCOUNT, &count, NULL );