mirror of https://git.ffmpeg.org/ffmpeg.git
lavu/bprint: add av_bprint_reset().
This commit is contained in:
parent
7a44223319
commit
9548deeea9
|
@ -153,7 +153,7 @@
|
|||
*/
|
||||
|
||||
#define LIBAVUTIL_VERSION_MAJOR 51
|
||||
#define LIBAVUTIL_VERSION_MINOR 50
|
||||
#define LIBAVUTIL_VERSION_MINOR 51
|
||||
#define LIBAVUTIL_VERSION_MICRO 100
|
||||
|
||||
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
|
||||
|
|
|
@ -119,6 +119,14 @@ void av_bprint_chars(AVBPrint *buf, char c, unsigned n)
|
|||
av_bprint_grow(buf, n);
|
||||
}
|
||||
|
||||
void av_bprint_clear(AVBPrint *buf)
|
||||
{
|
||||
if (buf->len) {
|
||||
*buf->str = 0;
|
||||
buf->len = 0;
|
||||
}
|
||||
}
|
||||
|
||||
int av_bprint_finalize(AVBPrint *buf, char **ret_str)
|
||||
{
|
||||
unsigned real_size = FFMIN(buf->len + 1, buf->size);
|
||||
|
|
|
@ -109,6 +109,11 @@ void av_bprintf(AVBPrint *buf, const char *fmt, ...) av_printf_format(2, 3);
|
|||
*/
|
||||
void av_bprint_chars(AVBPrint *buf, char c, unsigned n);
|
||||
|
||||
/**
|
||||
* Reset the string to "" but keep internal allocated data.
|
||||
*/
|
||||
void av_bprint_clear(AVBPrint *buf);
|
||||
|
||||
/**
|
||||
* Test if the print buffer is complete (not truncated).
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue