[vlc-devel] commit: give playlist to vlclua_playlist_add_internal instead of NULL, core doesn't like (Ilkka Ollakka )

git version control git at videolan.org
Fri Jun 27 13:15:14 CEST 2008


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Fri Jun 27 14:15:36 2008 +0300| [46cf6c1438d0c1a4b80ecbcc84a7cbbef0300930]

give playlist to vlclua_playlist_add_internal instead of NULL, core doesn't like
NULL as playlist. fixes eg. youtube usage for me. Thou not sure if this
could be done some better way.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=46cf6c1438d0c1a4b80ecbcc84a7cbbef0300930
---

 modules/misc/lua/demux.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/modules/misc/lua/demux.c b/modules/misc/lua/demux.c
index 890b643..db030fe 100644
--- a/modules/misc/lua/demux.c
+++ b/modules/misc/lua/demux.c
@@ -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 */
 }




More information about the vlc-devel mailing list