Commit d630dac5 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

MacOSX/Framework/VLCMedia.m: Make sure we compare the media_descriptor and not...

MacOSX/Framework/VLCMedia.m: Make sure we compare the media_descriptor and not the url, as we can have two perfect different media (different meta, different option), but with the same url.
parent 4c6e535f
...@@ -263,12 +263,14 @@ static void HandleMediaSubItemAdded(const libvlc_event_t * event, void * self) ...@@ -263,12 +263,14 @@ static void HandleMediaSubItemAdded(const libvlc_event_t * event, void * self)
- (NSComparisonResult)compare:(VLCMedia *)media - (NSComparisonResult)compare:(VLCMedia *)media
{ {
if (self == media) libvlc_media_descriptor_t * anOtherMd = [media libVLCMediaDescriptor];
/* We can release, we'll just use ptr */
libvlc_media_descriptor_release(anOtherMd);
if (self == media || p_md == anOtherMd)
return NSOrderedSame; return NSOrderedSame;
else if (!media) else if (!media)
return NSOrderedDescending; return NSOrderedDescending;
else return NSOrderedAscending;
return [[[self url] absoluteString] compare:[[media url] absoluteString]];
} }
@synthesize delegate; @synthesize delegate;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment