diff options
Diffstat (limited to 'libavformat/aviobuf.c')
-rw-r--r-- | libavformat/aviobuf.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c index 3d77a7ff25..377d96686d 100644 --- a/libavformat/aviobuf.c +++ b/libavformat/aviobuf.c @@ -1117,6 +1117,16 @@ int avio_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer) return size - padding; } +void ffio_free_dyn_buf(AVIOContext **s) +{ + uint8_t *tmp; + if (!*s) + return; + avio_close_dyn_buf(*s, &tmp); + av_free(tmp); + *s = NULL; +} + static int null_buf_write(void *opaque, uint8_t *buf, int buf_size) { DynBuffer *d = opaque; |