[vlc-commits] commit: M3U export: use local paths if applicable (fix #4063) ( Rémi Denis-Courmont )

git at videolan.org git at videolan.org
Tue Aug 17 18:46:22 CEST 2010


vlc/vlc-1.1 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Aug 17 19:44:14 2010 +0300| [b4a40fb8e676363514259cc4630ac412ce3d0c1a] | committer: Rémi Denis-Courmont 

M3U export: use local paths if applicable (fix #4063)

(cherry picked from commit bf472b10b5b217259a1d6fabcf438c5d196096c4)

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

 modules/misc/playlist/m3u.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/modules/misc/playlist/m3u.c b/modules/misc/playlist/m3u.c
index a5af0ac..5e69ae3 100644
--- a/modules/misc/playlist/m3u.c
+++ b/modules/misc/playlist/m3u.c
@@ -34,6 +34,7 @@
 #include <vlc_input.h>
 #include <vlc_meta.h>
 #include <vlc_charset.h>
+#include <vlc_url.h>
 
 #include <assert.h>
 
@@ -105,6 +106,13 @@ static void DoChildren( playlist_export_t *p_export, playlist_item_t *p_root,
         }
         vlc_mutex_unlock( &p_current->p_input->lock );
 
+        /* Stupid third party players don't understand file: URIs. */
+        char *psz_path = make_path( psz_uri );
+        if( psz_path != NULL )
+        {
+            free( psz_uri );
+            psz_uri = psz_path;
+        }
         fprintf( p_export->p_file, "%s\n", psz_uri );
         free( psz_uri );
     }



More information about the vlc-commits mailing list