[FFmpeg-devel] [PATCH 2/2] ffprobe: do not loose non ascii characters in non utf8 strings
Michael Niedermayer
michaelni at gmx.at
Sun Apr 13 15:32:41 CEST 2014
On Sun, Apr 13, 2014 at 12:13:28AM +0200, Nicolas George wrote:
> Le tridi 23 germinal, an CCXXII, Michael Niedermayer a écrit :
> > Fixes Ticket3363
> >
> > Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> > ---
> > ffprobe.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/ffprobe.c b/ffprobe.c
> > index ef3bcc6..7905f42 100644
> > --- 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="?"}},
>
> Maybe use U+FFFD REPLACEMENT CHARACTER, which is exactly designed for that?
>
> Retaining ASCII by default may be a good choice, but I am not sure in that
> case.
changed
applied
thanks
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Its not that you shouldnt use gotos but rather that you should write
readable code and code with gotos often but not always is less readable
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140413/c7093ca2/attachment.asc>
More information about the ffmpeg-devel
mailing list