]> git.sesse.net Git - vlc/blobdiff - modules/demux/mp4/mp4.c
* Fix playlist play of mp4 ref files.
[vlc] / modules / demux / mp4 / mp4.c
index a430c7fa3893039e9594302b3bd9fbeaf2d48eb5..e67d782a57bef6da198a868f19fea85fde3a3766 100644 (file)
@@ -364,7 +364,7 @@ static int Open( vlc_object_t * p_this )
         if( p_playlist )
         {
             b_play = FindItem( p_demux, p_playlist, &p_current );
-            p_item_in_category = playlist_ItemToNode( p_playlist, p_current );
+            p_item_in_category = playlist_ItemToNode( p_playlist, p_current, VLC_TRUE );
             p_current->p_input->i_type = ITEM_TYPE_PLAYLIST;
 
             for( i = 0; i < i_count; i++ )
@@ -417,7 +417,8 @@ static int Open( vlc_object_t * p_this )
                         input_ItemCopyOptions( p_current->p_input, p_input );
                         playlist_BothAddInput( p_playlist, p_input,
                                                p_item_in_category,
-                                               PLAYLIST_APPEND, PLAYLIST_END );
+                                               PLAYLIST_APPEND, PLAYLIST_END,
+                                               NULL, NULL);
                     }
                 }
                 else
@@ -427,11 +428,11 @@ static int Open( vlc_object_t * p_this )
                 }
                 if( psz_ref ) free( psz_ref );
             }
-            if( b_play && p_playlist->status.p_item &&
-                  p_playlist->status.p_item->i_children > 0)
+            if( b_play && p_item_in_category &&
+                p_item_in_category->i_children > 0 )
             {
-                playlist_Control( p_playlist, PLAYLIST_VIEWPLAY,
-                                  p_playlist->status.p_item, NULL );
+                playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, VLC_TRUE,
+                                  p_item_in_category, NULL );
             }
             vlc_object_release( p_playlist );
         }
@@ -2225,7 +2226,7 @@ static vlc_bool_t FindItem( demux_t *p_demux, playlist_t *p_playlist,
      {
          input_item_t *p_current = ( (input_thread_t*)p_demux->p_parent)->
                                                         input.p_item;
-         *pp_item = playlist_LockItemGetByInput( p_playlist, p_current );
+         *pp_item = playlist_ItemGetByInput( p_playlist, p_current, VLC_FALSE );
          if( !*pp_item )
          {
              msg_Dbg( p_playlist, "unable to find item in playlist");