[vlc-devel] [PATCH] lua: copy input options to result of playlist script

Pierre Ynard linkfanel at yahoo.fr
Thu Nov 4 00:39:55 CET 2010


This fixes this kind of scenario: you want to save a video from your
favorite video website. So you open the VLC GUI, you copy/paste the URL
into the convert dialog and you click on okay. The corresponding
playlist lua script processes the URL and a new item is added into the
playlist, but the :sout option is lost in the process, and you start
watching a video that is never saved.

This should be backported.


diff --git a/modules/misc/lua/vlc.c b/modules/misc/lua/vlc.c
index 6dd05b5..43f19d4 100644
--- a/modules/misc/lua/vlc.c
+++ b/modules/misc/lua/vlc.c
@@ -579,6 +579,7 @@ int __vlclua_playlist_add_internal( vlc_object_t *p_this, lua_State *L,
                     /* Append item to playlist */
                     if( p_parent ) /* Add to node */
                     {
+                        input_item_CopyOptions( p_parent, p_input );
                         input_item_node_AppendItem( p_parent_node, p_input );
                     }
                     else /* Play or Enqueue (preparse) */


Regards,

-- 
Pierre Ynard
"Une âme dans un corps, c'est comme un dessin sur une feuille de papier."



More information about the vlc-devel mailing list