[vlc-devel] commit: Playlist: correct insertion index when moving items into nodes ( Jakob Leben )

git version control git at videolan.org
Sat Aug 8 19:26:32 CEST 2009


vlc | branch: master | Jakob Leben <jakob.leben at gmail.com> | Sun Aug  2 14:13:41 2009 +0200| [d687ddf36a0d88ec0fbd504f2fb4218194d32398] | committer: Rémi Denis-Courmont 

Playlist: correct insertion index when moving items into nodes

Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>

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

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

diff --git a/src/playlist/item.c b/src/playlist/item.c
index b95fc42..23cff64 100644
--- a/src/playlist/item.c
+++ b/src/playlist/item.c
@@ -691,7 +691,7 @@ static int TreeMove( playlist_t *p_playlist, playlist_item_t *p_item,
      * down of the playlist. So when removing the element we have
      * to change the position as we loose one element
      */
-    if( j < i_newpos )
+    if( p_detach == p_node && j < i_newpos )
         i_newpos--;
 
     /* Attach to new parent */




More information about the vlc-devel mailing list