]> git.sesse.net Git - vlc/commitdiff
lua: Don't use the playlist in the lua demux.
authorPierre d'Herbemont <pdherbemont@videolan.org>
Sat, 14 Jun 2008 15:25:41 +0000 (17:25 +0200)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Sat, 14 Jun 2008 15:26:37 +0000 (17:26 +0200)
modules/misc/lua/playlist.c
modules/misc/lua/vlc.c

index b24457a133b72a2e25a61abda85266bdc90f91df..60602fd6efb28cef84a6348e4a648a6de5b0b053 100644 (file)
@@ -248,7 +248,6 @@ static int Demux( demux_t *p_demux )
     lua_State *L = p_demux->p_sys->L;
     char *psz_filename = p_demux->p_sys->psz_filename;
 
-    playlist_t *p_playlist = pl_Yield( p_demux );
     input_thread_t *p_input_thread = (input_thread_t *)
         vlc_object_find( p_demux, VLC_OBJECT_INPUT, FIND_PARENT );
     input_item_t *p_current_input = input_GetItem( p_input_thread );
@@ -275,13 +274,12 @@ static int Demux( demux_t *p_demux )
     }
 
     if( lua_gettop( L ) )
-        vlclua_playlist_add_internal( p_demux, L, p_playlist,
+        vlclua_playlist_add_internal( p_demux, L, NULL,
                                       p_current_input, 0 );
     else
         msg_Err( p_demux, "Script went completely foobar" );
 
     vlc_object_release( p_input_thread );
-    vlc_object_release( p_playlist );
 
     return -1; /* Needed for correct operation of go back */
 }
index 655926f66c63136081c48f90cdc152912c1833a6..c86dd2bb1f7b2b8a03bb72adca41eea1c013ba9c 100644 (file)
@@ -33,6 +33,8 @@
 # include "config.h"
 #endif
 
+#include <assert.h>
+
 #include <vlc_common.h>
 #include <vlc_plugin.h>
 #include <vlc_meta.h>
@@ -673,6 +675,8 @@ int __vlclua_playlist_add_internal( vlc_object_t *p_this, lua_State *L,
 {
     int i_count = 0;
 
+    assert( p_parent || p_playlist );
+
     /* playlist */
     if( lua_istable( L, -1 ) )
     {