Browse Source

ffprobe: do not escape '"' between single quotes.

tags/n1.1
Clément Bœsch 12 years ago
parent
commit
d079d1d368
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      ffprobe.c

+ 4
- 4
ffprobe.c View File

@@ -642,15 +642,15 @@ static const char *csv_escape_str(AVBPrint *dst, const char *src, const char sep
int needs_quoting = !!src[strcspn(src, meta_chars)];

if (needs_quoting)
av_bprint_chars(dst, '\"', 1);
av_bprint_chars(dst, '"', 1);

for (; *src; src++) {
if (*src == '"')
av_bprint_chars(dst, '\"', 1);
av_bprint_chars(dst, '"', 1);
av_bprint_chars(dst, *src, 1);
}
if (needs_quoting)
av_bprint_chars(dst, '\"', 1);
av_bprint_chars(dst, '"', 1);
return dst->str;
}

@@ -1254,7 +1254,7 @@ static const char *xml_escape_str(AVBPrint *dst, const char *src, void *log_ctx)
case '&' : av_bprintf(dst, "%s", "&"); break;
case '<' : av_bprintf(dst, "%s", "&lt;"); break;
case '>' : av_bprintf(dst, "%s", "&gt;"); break;
case '\"': av_bprintf(dst, "%s", "&quot;"); break;
case '"' : av_bprintf(dst, "%s", "&quot;"); break;
case '\'': av_bprintf(dst, "%s", "&apos;"); break;
default: av_bprint_chars(dst, *p, 1);
}


Loading…
Cancel
Save