From b522000e9b2ca36fe5b2751096b9a5f5ed8f87e6 Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Wed, 10 Oct 2012 01:39:06 +0200 Subject: avio: introduce avio_closep --- libavformat/aviobuf.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libavformat/aviobuf.c') diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c index 7dc66e25a6..da836c6fd5 100644 --- a/libavformat/aviobuf.c +++ b/libavformat/aviobuf.c @@ -768,6 +768,13 @@ int avio_close(AVIOContext *s) return ffurl_close(h); } +int avio_closep(AVIOContext **s) +{ + int ret = avio_close(*s); + *s = NULL; + return ret; +} + int avio_printf(AVIOContext *s, const char *fmt, ...) { va_list ap; -- cgit v1.2.3