changeset 5217:3e7152b383ca

Set the params given to a playlist url to the playlist
author albeu
date Wed, 20 Mar 2002 10:27:27 +0000
parents 228971e444ea
children 11c7ccce8ae3
files mplayer.c playtree.c playtree.h
diffstat 3 files changed, 21 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mplayer.c	Wed Mar 20 09:48:47 2002 +0000
+++ b/mplayer.c	Wed Mar 20 10:27:27 2002 +0000
@@ -937,6 +937,7 @@
       goto goto_next_file;
     }
     play_tree_insert_entry(playtree_iter->tree,entry);
+    play_tree_set_params_from(entry,playtree_iter->tree);
     entry = playtree_iter->tree;
     if(play_tree_iter_step(playtree_iter,1,0) != PLAY_TREE_ITER_ENTRY) {
       eof = PT_NEXT_ENTRY;
--- a/playtree.c	Wed Mar 20 09:48:47 2002 +0000
+++ b/playtree.c	Wed Mar 20 10:27:27 2002 +0000
@@ -382,6 +382,23 @@
   return 1;
 }
 
+void
+play_tree_set_params_from(play_tree_t* dest,play_tree_t* src) {
+  int i;
+
+#ifdef MP_DEBUG
+  assert(dest != NULL);
+  assert(src != NULL);
+#endif
+
+  if(!src->params)
+    return;
+
+  for(i = 0; src->params[i].name != NULL ; i++)
+    play_tree_set_param(dest,src->params[i].name,src->params[i].value);
+
+}
+
 static void 
 play_tree_iter_push_params(play_tree_iter_t* iter) {
   int n;
--- a/playtree.h	Wed Mar 20 09:48:47 2002 +0000
+++ b/playtree.h	Wed Mar 20 10:27:27 2002 +0000
@@ -117,6 +117,9 @@
 int
 play_tree_unset_param(play_tree_t* pt, char* name);
 
+// Set all paramter of source in dest
+void
+play_tree_set_params_from(play_tree_t* dest,play_tree_t* src);
 
 /// Iterator