]> git.sesse.net Git - vlc/commitdiff
M3U export: use local paths if applicable (fix #4063)
authorRémi Denis-Courmont <remi@remlab.net>
Tue, 17 Aug 2010 16:44:14 +0000 (19:44 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Tue, 17 Aug 2010 16:45:55 +0000 (19:45 +0300)
modules/misc/playlist/m3u.c

index a5af0aca1fc80aa1963f8bda721a8eff2e4b2c53..5e69ae3f292a6e739e3ab3066de36f6c9f9274ba 100644 (file)
@@ -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 );
     }