# HG changeset patch # User reimar # Date 1197918763 0 # Node ID d7b2ac8d796d5807dbd69457863d3e804ffda015 # Parent 51790e849ad3e1d62d413a7fef3011e5f64f77e0 Simplify av_close_input_file similarly to av_open_input_file previously diff -r 51790e849ad3 -r d7b2ac8d796d utils.c --- 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); }