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

Thomas Volkert silvo at gmx.net
Sun Dec 21 00:06:34 CET 2014


On 20.12.2014 00:41, Clément Bœsch wrote:
> 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.
>
>

If the code is changed, the documentation should be changed as well.
So, I would like to have a description about rather the current 
situation than a possible future extension.
Maybe the term "This function needs up to 21 bytes of buffer space." is 
better than "..must.... at least 21 bytes".

Best regards,
Thomas.



More information about the ffmpeg-devel mailing list