]> git.sesse.net Git - vlc/blobdiff - src/input/input.c
Improvements to the playlist core
[vlc] / src / input / input.c
index f3722188ced90edd842e6616b8a32a7804708a2d..e2092de6a9a9b7ddc85ccd1d3f6c1cac034d4b4d 100644 (file)
@@ -580,6 +580,7 @@ static int Init( input_thread_t * p_input )
         var_Change( p_input, "length", VLC_VAR_SETVALUE, &val, NULL );
 
         UpdateItemLength( p_input, val.i_time );
+        p_input->input.p_item->i_duration = val.i_time;
     }
 
     /* Start title/chapter */
@@ -893,6 +894,11 @@ static int Init( input_thread_t * p_input )
     msg_Dbg( p_input, "`%s' sucessfully opened",
              p_input->input.p_item->psz_uri );
 
+    /* Trigger intf update for this item */
+    /* Playlist has a callback on this variable and will forward
+     * it to intf */
+    var_SetInteger( p_input, "item-change", p_input->input.p_item->i_id );
+
     /* initialization is complete */
     p_input->i_state = PLAYING_S;