[vlc-devel] [PATCH 06/11] playlist/directory: attach slaves to input items
b.adolphi at gmail.com
Tue Apr 5 23:09:17 CEST 2016
Ok, so I realize that it is complicated or probably even impossible to
compare URLs in a scheme-independent manner. So what about limiting
scope? We don't really want to compare any kind of URL against any
other kind of URL. What we want to do is compare filenames and file
extensions. So we can of course not do this with URLs that do not have
a path. So let's limit which schemes we support to schemes that
actually have a path (and that VLC actually supports).
In addition, if we are afraid of comparing URLs with different schemes
(I am not sure if this is potentially problematic), we can also limit
the comparison to only compare URLs with the same scheme. Since we are
adding the slaves from the directory demuxer, the slaves and the input
item will have have URLs with the same scheme anyways.
On Tue, Apr 5, 2016 at 7:49 PM, Rémi Denis-Courmont <remi at remlab.net> wrote:
> Le 2016-04-05 18:53, Thomas Guillem a écrit :
>> On Tue, Apr 5, 2016, at 10:17, Rémi Denis-Courmont wrote:
>>> Le 2016-04-05 08:22, Steve Lhomme a écrit :
>>> > What is the issue here ? Do we want to avoid false positive slaves or
>>> > false negative salves ? I'd assume we want to avoid false positive
>>> > and
>>> > a basic string comparison avoids that.
>>> strcmp() on URIs is subject to both false positives and false
>> What about doing a comparaison of p_item->psz_name (only if it has an
>> extension) ?
> Uh? psz_name is a human-readable meaningless string. AFAIK, it is routinely
> modified while preparsing, so relying on it is insane.
> Rémi Denis-Courmont
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
More information about the vlc-devel