[Mlt-devel] [PATCH] fix playlist items move

2014-06-22 Thread Maksym Veremeyenko

Hi,

attached patch fix playlist item movement and setting new indexes.

--

Maksym Veremeyenko
From eff949aeec2ffbe5299ebd21b0163dbd1d1f1ab5 Mon Sep 17 00:00:00 2001
From: Maksym Veremeyenko ve...@m1.tv
Date: Sun, 22 Jun 2014 17:13:10 +0300
Subject: [PATCH 1/6] fix playlist items move

---
 src/framework/mlt_playlist.c |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/framework/mlt_playlist.c b/src/framework/mlt_playlist.c
index 62a1f16..306ff93 100644
--- a/src/framework/mlt_playlist.c
+++ b/src/framework/mlt_playlist.c
@@ -919,7 +919,9 @@ int mlt_playlist_move( mlt_playlist self, int src, int dest )
 
 		if ( current == src )
 			current = dest;
-		else if ( current  src  current  dest )
+		else if ( src  current  current  dest )
+			current --;
+		else if ( dest  current  current  src )
 			current ++;
 		else if ( current == dest )
 			current = src;
-- 
1.7.7.6

--
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing  Easy Data Exploration
http://p.sf.net/sfu/hpccsystems___
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel


Re: [Mlt-devel] [PATCH] fix playlist items move

2014-06-22 Thread Dan Dennedy
On Sun, Jun 22, 2014 at 11:14 AM, Dan Dennedy d...@dennedy.org wrote:
 On Sun, Jun 22, 2014 at 6:19 AM, Maksym Veremeyenko ve...@m1stereo.tv wrote:
 Hi,

 attached patch fix playlist item movement and setting new indexes.


 If you want me to apply your patch with your authorship information
 and git-am, then please use a better commit message. fix is not good
 enough.

I changed your message and committed it with your authorship. Please
keep in mind for future to have a meaningful message. Sometimes your
email body contains a better message!
-- 
+-DRD-+

--
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing  Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
___
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel