vlc/vlc-3.0 | branch: master | Pierre Lamot <[email protected]> | Mon May 14 
14:48:51 2018 +0200| [0597589315704c1e0314261526197b8604d09950] | committer: 
Jean-Baptiste Kempf

record: escape recording dst-prefix

  Fixes: #13104

Signed-off-by: RĂ©mi Denis-Courmont <[email protected]>
(cherry picked from commit 81233d4f0a0a23cecfb5a86da66623fe99c660de)
Signed-off-by: Jean-Baptiste Kempf <[email protected]>

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

 src/input/es_out.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/input/es_out.c b/src/input/es_out.c
index b86e684f8d..77eca7d966 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -493,8 +493,13 @@ static int EsOutSetRecord(  es_out_t *out, bool b_record )
             char *psz_file = input_CreateFilename( p_input, psz_path, 
INPUT_RECORD_PREFIX, NULL );
             if( psz_file )
             {
-                if( asprintf( &psz_sout, "#record{dst-prefix='%s'}", psz_file 
) < 0 )
-                    psz_sout = NULL;
+                char* psz_file_esc = config_StringEscape( psz_file );
+                if ( psz_file_esc )
+                {
+                    if( asprintf( &psz_sout, "#record{dst-prefix='%s'}", 
psz_file_esc ) < 0 )
+                        psz_sout = NULL;
+                    free( psz_file_esc );
+                }
                 free( psz_file );
             }
         }

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to