[vlc-devel] [PATCH] record: escape recording dst-prefix
Pierre Lamot
pierre at videolabs.io
Mon May 14 14:48:51 CEST 2018
Fixes: #13104
---
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 fcad73b5d9..60b4aa83cd 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -494,8 +494,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 );
}
}
--
2.14.1
More information about the vlc-devel
mailing list