[FFmpeg-devel] [PATCH] avcodec.h: document needed buffer size for av_get_codec_tag_string()

Clément Bœsch u at pkh.me
Sat Dec 20 00:41:56 CET 2014


On Sat, Dec 20, 2014 at 12:29:56AM +0100, Thomas Volkert wrote:
> From: Thomas Volkert <thomas at homer-conferencing.com>
> 
> ---
>  libavcodec/avcodec.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
> index 4b6b00c..0f69a18 100644
> --- a/libavcodec/avcodec.h
> +++ b/libavcodec/avcodec.h
> @@ -4900,6 +4900,8 @@ void avcodec_set_dimensions(AVCodecContext *s, int width, int height);
>  /**
>   * Put a string representing the codec tag codec_tag in buf.
>   *
> + * The buffer must have a size of at least 21 bytes.
> + *

This doesn't use much room for improvement/change. What if we end up
printing more information? I would simply say "32 is a recommended buffer
size since the function do pretty printing of the tag" or something along
these lines.

[...]

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20141220/cc0e2e1d/attachment.asc>


More information about the ffmpeg-devel mailing list