Commit e1e146a2 authored by Luca Barbato's avatar Luca Barbato

avio: make avio_close(NULL) a no-op

Its behaviour in line with ffurl_close(NULL).
parent 546adc1f
......@@ -756,8 +756,12 @@ int avio_open2(AVIOContext **s, const char *filename, int flags,
int avio_close(AVIOContext *s)
{
URLContext *h = s->opaque;
URLContext *h;
if (!s)
return 0;
h = s->opaque;
av_free(s->buffer);
av_free(s);
return ffurl_close(h);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment