Commit d10ea6d9 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Record: escape file names

Close #7490
(cherry picked from commit fe6e7e3d43238b85c9c2f2379410a5ea1c5c8247)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent c68e9688
...@@ -306,17 +306,24 @@ static int OutputNew( sout_stream_t *p_stream, ...@@ -306,17 +306,24 @@ static int OutputNew( sout_stream_t *p_stream,
const char *psz_muxer, const char *psz_prefix, const char *psz_extension ) const char *psz_muxer, const char *psz_prefix, const char *psz_extension )
{ {
sout_stream_sys_t *p_sys = p_stream->p_sys; 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; char *psz_output = NULL;
int i_count; 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_prefix, psz_extension ? "." : "", psz_extension ? psz_extension : "" ) < 0 )
{ {
psz_file = NULL;
goto error; 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'}", if( asprintf( &psz_output, "std{access=file,mux='%s',dst='%s'}",
psz_muxer, psz_file ) < 0 ) psz_muxer, psz_file ) < 0 )
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment