[FFmpeg-devel] [PATCH] mention that metadata tags are UTF-8

Reimar Döffinger Reimar.Doeffinger
Sun Feb 21 09:22:39 CET 2010


On Sun, Feb 21, 2010 at 08:34:39AM +0100, Anton Khirnov wrote:
> diff --git a/libavformat/avformat.h b/libavformat/avformat.h
> index 2e8770a..9c6c8df 100644
> --- a/libavformat/avformat.h
> +++ b/libavformat/avformat.h
> @@ -63,7 +63,8 @@ struct AVFormatContext;
>  /*
>   * Public Metadata API.
>   * The metadata API allows libavformat to export metadata tags to a client
> - * application using a sequence of key/value pairs.
> + * application using a sequence of key/value pairs stored as UTF-8 encoded
> + * Unicode strings.

Which part are you trying to document here, that they are strings (any reason that
would be non-obvious?), or that they are UTF-8?
Either way it should avoid two things:
1) giving the impression that it's a special case it is UTF-8 (all strings in FFmpeg
are UTF-8)
2) giving the impression that the strings are validated as being UTF-8 - while they
are _supposed_ to be UTF-8 they might be any 0-terminated binary data if coming from
a demuxer. If the application sets it, we may fail in the future if it's not valid UTF-8
though.



More information about the ffmpeg-devel mailing list