[vlc-commits] commit: Fix missing function bug (Olivier Aubert )

git at videolan.org git at videolan.org
Tue Apr 20 15:30:38 CEST 2010


vlc/python | branch: master | Olivier Aubert <olivier.aubert at liris.cnrs.fr> | Tue Apr 20 15:29:23 2010 +0200| [c809885bbf5fd5bf191a448d392e29c53854b7b6] | committer: Olivier Aubert 

Fix missing function bug

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

 override.py |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/override.py b/override.py
index 8cf379e..f3ced63 100644
--- a/override.py
+++ b/override.py
@@ -156,9 +156,13 @@ class MediaControl:
         @param end: the end position
         """
         if not isinstance(begin, MediaControlPosition):
-            begin=self.value2position(begin)
+            if begin == 0:
+                # Passing a 0 value. We will consider it as a relative position.
+                begin=MediaControlPosition(long(begin), PositionOrigin.RelativePosition)
+            else:
+                begin=MediaControlPosition(long(begin))
         if not isinstance(end, MediaControlPosition):
-            end=self.value2position(end)
+            end=MediaControlPosition(long(end))
         e=MediaControlException()
         mediacontrol_display_text(self, message, begin, end, e)
 



More information about the vlc-commits mailing list