mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
ffprobe: Consider the chosen separator when doing CSV escaping
Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
This commit is contained in:
parent
dd83028374
commit
dde8068856
@ -567,7 +567,8 @@ static const char *c_escape_str(AVBPrint *dst, const char *src, const char sep,
|
||||
*/
|
||||
static const char *csv_escape_str(AVBPrint *dst, const char *src, const char sep, void *log_ctx)
|
||||
{
|
||||
int needs_quoting = !!src[strcspn(src, "\",\n\r")];
|
||||
char meta_chars[] = { sep, '"', '\n', '\r', '\0' };
|
||||
int needs_quoting = !!src[strcspn(src, meta_chars)];
|
||||
|
||||
if (needs_quoting)
|
||||
av_bprint_chars(dst, '\"', 1);
|
||||
|
Loading…
Reference in New Issue
Block a user