]> git.sesse.net Git - vlc/commitdiff
Let input_item_AddSubItem set the playlist flags.
authorLaurent Aimar <fenrir@videolan.org>
Sat, 22 Nov 2008 09:06:12 +0000 (10:06 +0100)
committerLaurent Aimar <fenrir@videolan.org>
Sat, 22 Nov 2008 15:29:54 +0000 (16:29 +0100)
It will allows proper locking of p_item.

modules/demux/mp4/mp4.c

index 36469afc084286799b91fa4090afb4283e22c2d0..0f317dcf944d5f3d037aa076fb35d217dfdd9077 100644 (file)
@@ -368,9 +368,8 @@ static int Open( vlc_object_t * p_this )
 
         msg_Dbg( p_demux, "detected playlist mov file (%d ref)", i_count );
 
-        input_thread_t * p_input = vlc_object_find( p_demux, VLC_OBJECT_INPUT, FIND_PARENT );
-        input_item_t * p_current = input_GetItem( p_input );
-        p_current->i_type = ITEM_TYPE_PLAYLIST;
+        input_thread_t *p_input = vlc_object_find( p_demux, VLC_OBJECT_INPUT, FIND_PARENT );
+        input_item_t *p_current = input_GetItem( p_input );
 
         for( i = 0; i < i_count; i++ )
         {
@@ -415,10 +414,9 @@ static int Open( vlc_object_t * p_this )
                     psz_ref = psz_absolute;
                     free( psz_path );
                 }
-                input_item_t *p_input;
                 msg_Dbg( p_demux, "adding ref = `%s'", psz_ref );
-                p_input = input_item_NewExt( p_demux, psz_ref, NULL,
-                                    0, NULL, -1 );
+                input_item_t *p_input = input_item_NewExt( p_demux, psz_ref
+                                                           , NULL, 0, NULL, -1 );
                 input_item_CopyOptions( p_current, p_input );
                 input_item_AddSubItem( p_current, p_input );
                 vlc_gc_decref( p_input );