[vlc-commits] Record: escape file names
Jean-Baptiste Kempf
git at videolan.org
Sun Sep 30 17:03:19 CEST 2012
vlc/vlc-2.0 | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | 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 <jb at videolan.org>
> 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 )
{
More information about the vlc-commits
mailing list