ffprobe: do not lose non ascii characters in non utf8 strings
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 12 Apr 2014 18:13:13 +0000 (20:13 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 13 Apr 2014 13:21:20 +0000 (15:21 +0200)
Fixes Ticket3363

Using U+FFFD REPLACEMENT CHARACTER as suggested by nicolas

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffprobe.c

index ef3bcc6..9e39ff7 100644 (file)
--- a/ffprobe.c
+++ b/ffprobe.c
@@ -336,7 +336,7 @@ static const AVOption writer_options[] = {
     { "replace", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = WRITER_STRING_VALIDATION_REPLACE}, .unit = "sv" },
     { "fail",    NULL, 0, AV_OPT_TYPE_CONST, {.i64 = WRITER_STRING_VALIDATION_FAIL},    .unit = "sv" },
     { "string_validation_replacement", "set string validation replacement string", OFFSET(string_validation_replacement), AV_OPT_TYPE_STRING, {.str=""}},
-    { "svr", "set string validation replacement string", OFFSET(string_validation_replacement), AV_OPT_TYPE_STRING, {.str=""}},
+    { "svr", "set string validation replacement string", OFFSET(string_validation_replacement), AV_OPT_TYPE_STRING, {.str="\xEF\xBF\xBD"}},
     { NULL }
 };