[vlc-devel] commit: VLCMedia: Don't use setLength in -length. It is bad for bindings. ( Pierre d'Herbemont )

git version control git at videolan.org
Mon Feb 1 01:34:44 CET 2010


vlc | branch: master | Pierre d'Herbemont <pdherbemont at free.fr> | Sun Jan 31 23:40:17 2010 +0100| [abcd6bc8d007dbc09bb31ff01a56a04dac27cfe7] | committer: Pierre d'Herbemont 

VLCMedia: Don't use setLength in -length. It is bad for bindings.

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

 projects/macosx/framework/Sources/VLCMedia.m |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/projects/macosx/framework/Sources/VLCMedia.m b/projects/macosx/framework/Sources/VLCMedia.m
index 0cd9752..0fe9289 100644
--- a/projects/macosx/framework/Sources/VLCMedia.m
+++ b/projects/macosx/framework/Sources/VLCMedia.m
@@ -245,8 +245,7 @@ static void HandleMediaSubItemAdded(const libvlc_event_t * event, void * self)
     // Testing to see if the pointer exists is not required, if the pointer is null
     // then the release message is not sent to it.
     delegate = nil;
-    [self setLength:nil];
-
+    [length release];
     [url release];
     [subitems release];
     [metaDictionary release];
@@ -281,7 +280,7 @@ static void HandleMediaSubItemAdded(const libvlc_event_t * event, void * self)
         long long duration = libvlc_media_get_duration( p_md, NULL );
         if (duration > -1)
         {
-            [self setLength:[VLCTime timeWithNumber:[NSNumber numberWithLongLong:duration]]];
+            length = [[VLCTime timeWithNumber:[NSNumber numberWithLongLong:duration]] retain];
             return [[length retain] autorelease];
         }
         return [VLCTime nullTime];




More information about the vlc-devel mailing list