diff options
author | Clément Bœsch <ubitux@gmail.com> | 2012-05-13 11:38:19 +0200 |
---|---|---|
committer | Clément Bœsch <ubitux@gmail.com> | 2012-05-14 19:11:39 +0200 |
commit | 9548deeea9434732a718749ae931be53caba2c30 (patch) | |
tree | 8594d2a076a417fdc2bcbbe9e76c26cc5000fac2 /libavutil/bprint.c | |
parent | 7a442233198ad71785cc9bf540eb0b7aaef25dd2 (diff) | |
download | ffmpeg-9548deeea9434732a718749ae931be53caba2c30.tar.gz |
lavu/bprint: add av_bprint_reset().
Diffstat (limited to 'libavutil/bprint.c')
-rw-r--r-- | libavutil/bprint.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavutil/bprint.c b/libavutil/bprint.c index 08383b293a..115bf0c8de 100644 --- a/libavutil/bprint.c +++ b/libavutil/bprint.c @@ -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); |