]> git.sesse.net Git - vlc/commitdiff
give playlist to vlclua_playlist_add_internal instead of NULL, core doesn't like
authorIlkka Ollakka <ileoo@videolan.org>
Fri, 27 Jun 2008 11:15:36 +0000 (14:15 +0300)
committerIlkka Ollakka <ileoo@videolan.org>
Fri, 27 Jun 2008 11:15:36 +0000 (14:15 +0300)
NULL as playlist. fixes eg. youtube usage for me. Thou not sure if this
could be done some better way.

modules/misc/lua/demux.c

index 890b643c7b59523a9c61b899dd597c5755d9635c..db030fe3956d9558324d34e05d8e4fac68f1857d 100644 (file)
@@ -246,6 +246,7 @@ static int Demux( demux_t *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 );
+    playlist_t *p_playlist = pl_Yield( p_demux );
 
     luaL_register( L, "vlc", p_reg_parse );
 
@@ -269,12 +270,13 @@ static int Demux( demux_t *p_demux )
     }
 
     if( lua_gettop( L ) )
-        vlclua_playlist_add_internal( p_demux, L, NULL,
+        vlclua_playlist_add_internal( p_demux, L, p_playlist,
                                       p_current_input, 0 );
     else
         msg_Err( p_demux, "Script went completely foobar" );
 
     vlc_object_release( p_input_thread );
+    pl_Release( p_playlist );
 
     return -1; /* Needed for correct operation of go back */
 }