[vlc-commits] commit: Fixed rar stream_filter generated playlist. (Laurent Aimar )

git at videolan.org git at videolan.org
Fri Nov 12 03:00:13 CET 2010


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Tue Nov  9 19:29:17 2010 +0100| [735ec223092c17d5b77cdfcca25a528531e69a70] | committer: Laurent Aimar 

Fixed rar stream_filter generated playlist.

The items url where not complete.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=735ec223092c17d5b77cdfcca25a528531e69a70
---

 modules/access/rar/stream.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/modules/access/rar/stream.c b/modules/access/rar/stream.c
index eaa0a11..fcf9180 100644
--- a/modules/access/rar/stream.c
+++ b/modules/access/rar/stream.c
@@ -104,8 +104,13 @@ static int Open(vlc_object_t *object)
      * Reusing WriteXSPF from the zip access is probably a good idea
      * (becareful about '\' and '/'.
      */
+    char *mrl;
+    if (asprintf(&mrl, "%s://%s", s->psz_access, s->psz_path)< 0)
+        mrl = NULL;
     char *base;
-    char *encoded = encode_URI_component(s->psz_path);
+    char *encoded = mrl ? encode_URI_component(mrl) : NULL;
+    free(mrl);
+
     if (!encoded || asprintf(&base, "rar://%s", encoded) < 0)
         base = NULL;
     free(encoded);



More information about the vlc-commits mailing list