summaryrefslogtreecommitdiff
path: root/libavformat/avio.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/avio.c')
-rw-r--r--libavformat/avio.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/libavformat/avio.c b/libavformat/avio.c
index 5a1c79ec8e..8b7e495e55 100644
--- a/libavformat/avio.c
+++ b/libavformat/avio.c
@@ -315,8 +315,9 @@ int64_t ffurl_seek(URLContext *h, int64_t pos, int whence)
return ret;
}
-int ffurl_close(URLContext *h)
+int ffurl_closep(URLContext **hh)
{
+ URLContext *h= *hh;
int ret = 0;
if (!h) return 0; /* can happen when ffurl_open fails */
@@ -331,10 +332,16 @@ int ffurl_close(URLContext *h)
av_opt_free(h->priv_data);
av_freep(&h->priv_data);
}
- av_free(h);
+ av_freep(hh);
return ret;
}
+int ffurl_close(URLContext *h)
+{
+ return ffurl_closep(&h);
+}
+
+
int avio_check(const char *url, int flags)
{
URLContext *h;