diff options
author | Nicolas George <nicolas.george@normalesup.org> | 2012-10-28 14:40:30 +0100 |
---|---|---|
committer | Nicolas George <nicolas.george@normalesup.org> | 2012-11-02 15:12:29 +0100 |
commit | 483c1aa5f114bfed36a6e1c9eeb1e647124559f7 (patch) | |
tree | b62362ceb28084bd7ba8855a6a5c75feee128c0b /libavutil/bprint.h | |
parent | 8551c6bec0fd6cf719f94b24bca39b1c3318e213 (diff) | |
download | ffmpeg-483c1aa5f114bfed36a6e1c9eeb1e647124559f7.tar.gz |
lavu/bprint: add av_bprint_get_buffer().
It is useful to use bprint to handle a growing buffer
used with another API.
Diffstat (limited to 'libavutil/bprint.h')
-rw-r--r-- | libavutil/bprint.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libavutil/bprint.h b/libavutil/bprint.h index 2bef18db23..c09b61f20f 100644 --- a/libavutil/bprint.h +++ b/libavutil/bprint.h @@ -126,6 +126,18 @@ void av_bprintf(AVBPrint *buf, const char *fmt, ...) av_printf_format(2, 3); void av_bprint_chars(AVBPrint *buf, char c, unsigned n); /** + * Allocate bytes in the buffer for external use. + * + * @param[in] buf buffer structure + * @param[in] size required size + * @param[out] mem pointer to the memory area + * @param[out] actual_size size of the memory area after allocation; + * can be larger or smaller than size + */ +void av_bprint_get_buffer(AVBPrint *buf, unsigned size, + unsigned char **mem, unsigned *actual_size); + +/** * Reset the string to "" but keep internal allocated data. */ void av_bprint_clear(AVBPrint *buf); |