Skip to content
Snippets Groups Projects
Commit d630dac5 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont
Browse files

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
No related branches found
No related tags found
No related merge requests found
......@@ -263,12 +263,14 @@ static void HandleMediaSubItemAdded(const libvlc_event_t * event, void * self)
- (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;
else if (!media)
return NSOrderedDescending;
else
return [[[self url] absoluteString] compare:[[media url] absoluteString]];
return NSOrderedAscending;
}
@synthesize delegate;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment