Mercurial > libavformat.hg
changeset 2830:d7b2ac8d796d libavformat
Simplify av_close_input_file similarly to av_open_input_file previously
author | reimar |
---|---|
date | Mon, 17 Dec 2007 19:12:43 +0000 |
parents | 51790e849ad3 |
children | e89500ae1608 |
files | utils.c |
diffstat | 1 files changed, 2 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/utils.c Mon Dec 17 19:08:17 2007 +0000 +++ b/utils.c Mon Dec 17 19:12:43 2007 +0000 @@ -2041,7 +2041,7 @@ void av_close_input_file(AVFormatContext *s) { - int i, must_open_file; + int i; AVStream *st; /* free previous packet */ @@ -2068,13 +2068,8 @@ av_freep(&s->programs[i]); } flush_packet_queue(s); - must_open_file = 1; - if (s->iformat->flags & AVFMT_NOFILE) { - must_open_file = 0; - } - if (must_open_file) { + if (!(s->iformat->flags & AVFMT_NOFILE)) url_fclose(s->pb); - } av_freep(&s->priv_data); av_free(s); }