mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
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_MAJOR 51
|
||||||
#define LIBAVUTIL_VERSION_MINOR 50
|
#define LIBAVUTIL_VERSION_MINOR 51
|
||||||
#define LIBAVUTIL_VERSION_MICRO 100
|
#define LIBAVUTIL_VERSION_MICRO 100
|
||||||
|
|
||||||
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
|
#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);
|
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)
|
int av_bprint_finalize(AVBPrint *buf, char **ret_str)
|
||||||
{
|
{
|
||||||
unsigned real_size = FFMIN(buf->len + 1, buf->size);
|
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);
|
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).
|
* Test if the print buffer is complete (not truncated).
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user