vlc/vlc-2.0 | branch: master | Jean-Baptiste Kempf <[email protected]> | Mon Sep 24 15:30:34 2012 +0200| [d10ea6d9b58afaada9e1fe2e4d61fee41af83b05] | committer: Jean-Baptiste Kempf
Record: escape file names Close #7490 (cherry picked from commit fe6e7e3d43238b85c9c2f2379410a5ea1c5c8247) Signed-off-by: Jean-Baptiste Kempf <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=d10ea6d9b58afaada9e1fe2e4d61fee41af83b05 --- modules/stream_out/record.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/modules/stream_out/record.c b/modules/stream_out/record.c index a75e279..b8f1ac1 100644 --- a/modules/stream_out/record.c +++ b/modules/stream_out/record.c @@ -306,17 +306,24 @@ static int OutputNew( sout_stream_t *p_stream, const char *psz_muxer, const char *psz_prefix, const char *psz_extension ) { sout_stream_sys_t *p_sys = p_stream->p_sys; - char *psz_file = NULL; + char *psz_file = NULL, *psz_tmp = NULL; char *psz_output = NULL; int i_count; - if( asprintf( &psz_file, "%s%s%s", + if( asprintf( &psz_tmp, "%s%s%s", psz_prefix, psz_extension ? "." : "", psz_extension ? psz_extension : "" ) < 0 ) { - psz_file = NULL; goto error; } + psz_file = config_StringEscape( psz_tmp ); + if( !psz_file ) + { + free( psz_tmp ); + goto error; + } + free( psz_tmp ); + if( asprintf( &psz_output, "std{access=file,mux='%s',dst='%s'}", psz_muxer, psz_file ) < 0 ) { _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
