demux/playlist: ProcessMRL: fallback to original if valid scheme
commitd52e55f90bd021794fe330af8e21e36e244550a7
authorFilip Roséen <filip@atch.se>
Thu, 23 Mar 2017 02:07:07 +0000 (23 03:07 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Mon, 27 Mar 2017 06:52:11 +0000 (27 08:52 +0200)
tree22d9893e54dc3a1223f667cbcd8a335a06dadd46
parent57dcb5bce452328ff508315ba434fb6e4dece6dc
demux/playlist: ProcessMRL: fallback to original if valid scheme

The changes introduced in 36bee77 had the unfortunate side-effect that
location-data that could not be parsed as a URL would be discarded,
for example an xspf playlist containing the line below would simply
ignore it (due to ProcessMRL rejecting it):

> dvb-t://frequency=674000000:inversion=-1:bandwidth=8:code-rate-hp=2/3:code-rate-lp=1/2:modulation=64QAM:transmission=8:guard=1/32:

In order to fix the issue while still allowing uri-resolving for
URI-valid entities, the following changes make sure that we retain the
original string if it contains "://" and all prior characters are
valid in a scheme.

fixes: #18155

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/demux/playlist/playlist.c