[vlc-commits] demux: xspf: default psz_base to the XSPF resource location (fixes #6186, #12058)

Anatoliy Anischovich git at videolan.org
Wed Dec 31 11:02:26 CET 2014


vlc/vlc-2.2 | branch: master | Anatoliy Anischovich <lin.aaa.lin at gmail.com> | Fri Dec 26 10:29:10 2014 +0200| [5173fd9f4ee7fef3c1781f0747019c4ef3d8dc95] | committer: Jean-Baptiste Kempf

demux: xspf: default psz_base to the XSPF resource location (fixes #6186, #12058)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
(cherry picked from commit 6ed9931a413ff81c8e7eb7ef73877ba4c6de6c7d)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/demux/playlist/xspf.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/modules/demux/playlist/xspf.c b/modules/demux/playlist/xspf.c
index a58782b..a808347 100644
--- a/modules/demux/playlist/xspf.c
+++ b/modules/demux/playlist/xspf.c
@@ -86,6 +86,7 @@ int Import_xspf(vlc_object_t *p_this)
 {
     DEMUX_BY_EXTENSION_OR_MIMETYPE(".xspf", "application/xspf+xml",
                                       "using XSPF playlist reader");
+
     return VLC_SUCCESS;
 }
 
@@ -113,7 +114,7 @@ static int Demux(demux_t *p_demux)
     p_demux->p_sys->pp_tracklist = NULL;
     p_demux->p_sys->i_tracklist_entries = 0;
     p_demux->p_sys->i_track_id = -1;
-    p_demux->p_sys->psz_base = NULL;
+    p_demux->p_sys->psz_base = FindPrefix(p_demux);
 
     /* create new xml parser from stream */
     p_xml_reader = xml_ReaderCreate(p_demux, p_demux->s);
@@ -479,8 +480,6 @@ static bool parse_track_node COMPLEX_INTERFACE
              * and anchors (#...) are not resolved correctly. Also,
              * host-relative (/...) and directory-relative locations
              * ("relative path" in vernacular) should be resolved.
-             * Last, psz_base should default to the XSPF resource
-             * location if missing (not the current working directory).
              * -- Courmisch */
             if (p_sys->psz_base && !strstr(psz_value, "://"))
             {



More information about the vlc-commits mailing list