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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-01-09 13:39:06 +01:00
parent b88e80589b
commit 2959a61232

View File

@ -496,7 +496,7 @@ fail:
ff_id3v2_free_extra_meta(&id3v2_extra_meta);
av_dict_free(&tmp);
if (s->pb && !(s->flags & AVFMT_FLAG_CUSTOM_IO))
avio_close(s->pb);
avio_closep(&s->pb);
avformat_free_context(s);
*ps = NULL;
return ret;