]> git.sesse.net Git - vlc/blobdiff - modules/demux/playlist/m3u.c
Fix breakage in transcode file selection
[vlc] / modules / demux / playlist / m3u.c
index 9c41304d72faede166cad3404c3993b001bd7b61..a0c688d6799512e2c2d4546c94010b43dc881178 100644 (file)
@@ -67,6 +67,7 @@ int Import_M3U( vlc_object_t *p_this )
     }
     else if( ( psz_ext && !strcasecmp( psz_ext, ".m3u") ) ||
              ( psz_ext && !strcasecmp( psz_ext, ".ram") ) ||
+             ( psz_ext && !strcasecmp( psz_ext, ".rm") ) ||
              /* A .ram file can contain a single rtsp link */
              ( p_demux->psz_demux && !strcmp(p_demux->psz_demux, "m3u") ) )
     {
@@ -186,8 +187,14 @@ static int Demux( demux_t *p_demux )
         }
         else if( *psz_parse )
         {
-            char *psz_mrl =
-                ProcessMRL( psz_parse, p_demux->p_sys->psz_prefix );
+            char *psz_mrl;
+            if( !psz_name || !*psz_name )
+            {
+                /* Use filename as name for relative entries */
+                psz_name = strdup( psz_parse );
+            }
+
+            psz_mrl = ProcessMRL( psz_parse, p_demux->p_sys->psz_prefix );
 
             b_cleanup = VLC_TRUE;
             if( !psz_mrl ) goto error;