[vlc-commits] commit: Missing path->URI conversion for subtitles ( Rémi Denis-Courmont )

git at videolan.org git at videolan.org
Wed May 12 18:30:08 CEST 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed May 12 19:23:47 2010 +0300| [bc3f40f7321db0f8c1015d2f3d2ce6ef3db88fd4] | committer: Rémi Denis-Courmont 

Missing path->URI conversion for subtitles

Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>

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

 src/input/input.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/src/input/input.c b/src/input/input.c
index 94cd0eb..5c0181f 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -3157,14 +3157,19 @@ static void SubtitleAdd( input_thread_t *p_input, char *psz_subtitle, bool b_for
         free( psz_path );
     }
 
+    char *url = make_URI( psz_subtitle );
+
     var_Change( p_input, "spu-es", VLC_VAR_CHOICESCOUNT, &count, NULL );
 
     sub = InputSourceNew( p_input );
-    if( !sub || InputSourceInit( p_input, sub, psz_subtitle, "subtitle" ) )
+    if( !sub || !url
+     || InputSourceInit( p_input, sub, url, "subtitle" ) )
     {
         free( sub );
+        free( url );
         return;
     }
+    free( url );
     TAB_APPEND( p_input->p->i_slave, p_input->p->slave, sub );
 
     /* Select the ES */



More information about the vlc-commits mailing list