[vlc-commits] Revert "input/item: invert CopyOptions argument order"
Rémi Denis-Courmont
git at videolan.org
Wed Apr 13 21:16:30 CEST 2016
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Apr 13 22:15:23 2016 +0300| [62131e939059955894cf3f6c831a97b73b17359b] | committer: Rémi Denis-Courmont
Revert "input/item: invert CopyOptions argument order"
This reverts commit 1d8338cdb4bed59687497bc30044eb1622a009c2, which is
obviously wrong.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=62131e939059955894cf3f6c831a97b73b17359b
---
include/vlc_input_item.h | 2 +-
modules/access/cdda.c | 2 +-
modules/demux/mp4/mp4.c | 2 +-
modules/demux/playlist/asx.c | 4 ++--
modules/demux/playlist/directory.c | 2 +-
modules/demux/playlist/pls.c | 4 ++--
modules/demux/playlist/sgimb.c | 2 +-
modules/demux/playlist/shoutcast.c | 4 ++--
modules/demux/playlist/xspf.c | 2 +-
modules/lua/vlc.c | 2 +-
src/input/item.c | 6 ++++--
11 files changed, 17 insertions(+), 15 deletions(-)
diff --git a/include/vlc_input_item.h b/include/vlc_input_item.h
index 253fe22..0ff51e3 100644
--- a/include/vlc_input_item.h
+++ b/include/vlc_input_item.h
@@ -128,7 +128,7 @@ struct input_item_node_t
bool b_can_loop;
};
-VLC_API void input_item_CopyOptions( input_item_t *p_child, const input_item_t *p_parent );
+VLC_API void input_item_CopyOptions( input_item_t *p_parent, input_item_t *p_child );
VLC_API void input_item_SetName( input_item_t *p_item, const char *psz_name );
/**
diff --git a/modules/access/cdda.c b/modules/access/cdda.c
index 5253ea5..e17bf86 100644
--- a/modules/access/cdda.c
+++ b/modules/access/cdda.c
@@ -494,7 +494,7 @@ static int GetTracks( access_t *p_access, input_item_t *p_current )
if( unlikely(p_item == NULL) )
continue;
- input_item_CopyOptions( p_item, p_current );
+ input_item_CopyOptions( p_current, p_item );
if( likely(asprintf( &psz_opt, "cdda-track=%i", i+1 ) != -1) )
{
diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index 582e9fd..5bd2527 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -694,7 +694,7 @@ static int Open( vlc_object_t * p_this )
}
msg_Dbg( p_demux, "adding ref = `%s'", psz_ref );
input_item_t *p_item = input_item_New( psz_ref, NULL );
- input_item_CopyOptions( p_item, p_current );
+ input_item_CopyOptions( p_current, p_item );
input_item_node_AppendItem( p_subitems, p_item );
vlc_gc_decref( p_item );
}
diff --git a/modules/demux/playlist/asx.c b/modules/demux/playlist/asx.c
index ed216c9..13c1237 100644
--- a/modules/demux/playlist/asx.c
+++ b/modules/demux/playlist/asx.c
@@ -267,7 +267,7 @@ static void ProcessEntry( int *pi_n_entry, xml_reader_t *p_xml_reader,
/* Create the input item */
p_entry = input_item_NewExt( psz_mrl, psz_name, i_options,
(const char* const*) ppsz_options, VLC_INPUT_OPTION_TRUSTED, i_duration );
- input_item_CopyOptions( p_entry, p_current_input );
+ input_item_CopyOptions( p_current_input, p_entry );
/* Add the metadata */
if( psz_name )
@@ -403,7 +403,7 @@ static int Demux( demux_t *p_demux )
psz_txt = strdup( psz_node );
vlc_xml_decode( psz_txt );
p_input = input_item_New( psz_txt, psz_title_asx );
- input_item_CopyOptions( p_input, p_current_input );
+ input_item_CopyOptions( p_current_input, p_input );
input_item_node_AppendItem( p_subitems, p_input );
vlc_gc_decref( p_input );
diff --git a/modules/demux/playlist/directory.c b/modules/demux/playlist/directory.c
index e1ff41d..4ad4d76 100644
--- a/modules/demux/playlist/directory.c
+++ b/modules/demux/playlist/directory.c
@@ -177,7 +177,7 @@ static int Demux( demux_t *p_demux )
if( has_ext( psz_ignored_exts, p_item->psz_name ) )
goto skip_item;
- input_item_CopyOptions( p_item, p_node->p_item );
+ input_item_CopyOptions( p_node->p_item, p_item );
if( !input_item_node_AppendItem( p_node, p_item ) )
i_ret = VLC_ENOMEM;
skip_item:
diff --git a/modules/demux/playlist/pls.c b/modules/demux/playlist/pls.c
index e132023..7646aae 100644
--- a/modules/demux/playlist/pls.c
+++ b/modules/demux/playlist/pls.c
@@ -142,7 +142,7 @@ static int Demux( demux_t *p_demux )
if( psz_mrl )
{
p_input = input_item_New( psz_mrl, psz_name );
- input_item_CopyOptions( p_input, p_current_input );
+ input_item_CopyOptions( p_current_input, p_input );
input_item_node_AppendItem( p_subitems, p_input );
vlc_gc_decref( p_input );
free( psz_mrl_orig );
@@ -187,7 +187,7 @@ static int Demux( demux_t *p_demux )
if( psz_mrl )
{
p_input = input_item_New( psz_mrl, psz_name );
- input_item_CopyOptions( p_input, p_current_input );
+ input_item_CopyOptions( p_current_input, p_input );
input_item_node_AppendItem( p_subitems, p_input );
vlc_gc_decref( p_input );
free( psz_mrl_orig );
diff --git a/modules/demux/playlist/sgimb.c b/modules/demux/playlist/sgimb.c
index 418278e..229172f 100644
--- a/modules/demux/playlist/sgimb.c
+++ b/modules/demux/playlist/sgimb.c
@@ -383,7 +383,7 @@ static int Demux ( demux_t *p_demux )
return -1;
}
- input_item_CopyOptions( p_child, p_current_input );
+ input_item_CopyOptions( p_current_input, p_child );
if( p_sys->i_packet_size && p_sys->psz_mcast_ip )
{
char *psz_option;
diff --git a/modules/demux/playlist/shoutcast.c b/modules/demux/playlist/shoutcast.c
index c3e1c54..336361c 100644
--- a/modules/demux/playlist/shoutcast.c
+++ b/modules/demux/playlist/shoutcast.c
@@ -173,7 +173,7 @@ static int DemuxGenre( demux_t *p_demux, xml_reader_t *p_xml_reader,
input_item_t *p_input;
vlc_xml_decode( psz_mrl );
p_input = input_item_New( psz_mrl, psz_name );
- input_item_CopyOptions( p_input, p_input_node->p_item );
+ input_item_CopyOptions( p_input_node->p_item, p_input );
free( psz_mrl );
input_item_node_AppendItem( p_input_node, p_input );
vlc_gc_decref( p_input );
@@ -326,7 +326,7 @@ static int DemuxStation( demux_t *p_demux, xml_reader_t *p_xml_reader,
if( likely(p_input != NULL) )
{
- input_item_CopyOptions( p_input, p_input_node->p_item );
+ input_item_CopyOptions( p_input_node->p_item, p_input );
#define SADD_INFO( type, field ) \
if( field ) \
diff --git a/modules/demux/playlist/xspf.c b/modules/demux/playlist/xspf.c
index d4150d2..55c721a 100644
--- a/modules/demux/playlist/xspf.c
+++ b/modules/demux/playlist/xspf.c
@@ -502,7 +502,7 @@ static bool parse_track_node COMPLEX_INTERFACE
}
else
input_item_SetURI(p_new_input, psz_value);
- input_item_CopyOptions(p_new_input, p_input_item);
+ input_item_CopyOptions(p_input_item, p_new_input);
}
else
{
diff --git a/modules/lua/vlc.c b/modules/lua/vlc.c
index 6c2430a..4340038 100644
--- a/modules/lua/vlc.c
+++ b/modules/lua/vlc.c
@@ -574,7 +574,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_input, p_parent );
+ input_item_CopyOptions( p_parent, p_input );
input_item_node_AppendItem( p_parent_node, p_input );
}
else /* Play or Enqueue (preparse) */
diff --git a/src/input/item.c b/src/input/item.c
index 8767a85..8fb345e 100644
--- a/src/input/item.c
+++ b/src/input/item.c
@@ -157,8 +157,10 @@ void input_item_SetMeta( input_item_t *p_i, vlc_meta_type_t meta_type, const cha
vlc_event_send( &p_i->event_manager, &event );
}
-void input_item_CopyOptions( input_item_t *p_child,
- const input_item_t *p_parent )
+/* FIXME GRRRRRRRRRR args should be in the reverse order to be
+ * consistent with (nearly?) all or copy funcs */
+void input_item_CopyOptions( input_item_t *p_parent,
+ input_item_t *p_child )
{
vlc_mutex_lock( &p_parent->lock );
More information about the vlc-commits
mailing list