[FFmpeg-devel] [RFC] SDP Generation
Luca Abeni
lucabe72
Wed Jul 18 09:27:16 CEST 2007
Hi all,
Luca Abeni wrote:
[...]
> Opss. I was under the impression that vsnprintf() printed at most n
> characters, and returned the number of written characters. Sorry about
> that, I'll fix the code going for an strlcatf()-like solution as you
> suggest.
I think this strlcatf() function can be useful for others too, and not
only for the SDP generator. Should I submit a patch adding av_strlcatf()
to libavutil/string.c?
Such function would look like:
/**
* Append output to a string, according to a format. Never writes out of
* the destination buffer.
* @param dst destination buffer (string to which the output is
* appended)
* @param size total size of the destination buffer
* @param fmt printf-compatible format string, specifying how the
* following parameters are used
* @return the total length of the resulting string
*/
size_t av_strlcatf(char *dst, size_t size, const char *fmt, ...)
Thanks,
Luca
More information about the ffmpeg-devel
mailing list