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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/101/merge
Michael Niedermayer 10 years ago
parent b88e80589b
commit 2959a61232
  1. 2
      libavformat/utils.c

@ -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;

Loading…
Cancel
Save