Commit 2959a612 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/utils: Use avio_closep() to avoid leaving stale pointers in memory

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent b88e8058
...@@ -496,7 +496,7 @@ fail: ...@@ -496,7 +496,7 @@ fail:
ff_id3v2_free_extra_meta(&id3v2_extra_meta); ff_id3v2_free_extra_meta(&id3v2_extra_meta);
av_dict_free(&tmp); av_dict_free(&tmp);
if (s->pb && !(s->flags & AVFMT_FLAG_CUSTOM_IO)) if (s->pb && !(s->flags & AVFMT_FLAG_CUSTOM_IO))
avio_close(s->pb); avio_closep(&s->pb);
avformat_free_context(s); avformat_free_context(s);
*ps = NULL; *ps = NULL;
return ret; return ret;
......
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