[vlc-commits] commit: core playlist: fix my mistake in [4eff56920] (Jakob Leben )

git at videolan.org git at videolan.org
Tue Jun 15 10:51:52 CEST 2010


vlc | branch: master | Jakob Leben <jleben at videolan.org> | Tue Jun 15 10:44:42 2010 +0200| [c35e504a57cead20266b1c37b137a3ad98c3d1cd] | committer: Jakob Leben 

core playlist: fix my mistake in [4eff56920]

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

 src/playlist/item.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/playlist/item.c b/src/playlist/item.c
index 8213308..9f2b7bf 100644
--- a/src/playlist/item.c
+++ b/src/playlist/item.c
@@ -821,9 +821,6 @@ static int RecursiveAddIntoParent (
           if( !p_new_item ) return i_pos;
 
           i_pos++;
-
-          //Swap parent for new item, if we will recurse
-          if( b_children ) p_parent = p_new_item;
       }
       //Recurse if any children
       if( b_children )
@@ -831,7 +828,9 @@ static int RecursiveAddIntoParent (
           //Substitute p_new_item for first child leaf
           //(If flat, continue counting from current position)
           int i_last_pos = RecursiveAddIntoParent(
-                                      p_playlist, p_parent, p_child_node,
+                                      p_playlist,
+                                      p_new_item ? p_new_item : p_parent,
+                                      p_child_node,
                                       ( b_flat ? i_pos : 0 ),
                                       b_flat,
                                       &p_new_item );



More information about the vlc-commits mailing list