[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:37 CEST 2010


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

Missing path->URI conversion for subtitles

Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>
(cherry picked from commit bc3f40f7321db0f8c1015d2f3d2ce6ef3db88fd4)

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

 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 06b7c00..e53a6c6 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -3198,14 +3198,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