summaryrefslogtreecommitdiff
path: root/libavformat/utils.c
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2007-12-17 19:12:43 +0000
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2007-12-17 19:12:43 +0000
commitca75a92325f77aaadb234e947c6242c3344233e7 (patch)
tree3ac29b44224187cb5f88e642adaed8ffc35ba537 /libavformat/utils.c
parent17acc63a32b4842dc1e9d578bfafd2bd98a273b4 (diff)
Simplify av_close_input_file similarly to av_open_input_file previously
Originally committed as revision 11254 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r--libavformat/utils.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 949e2a88b6..1a34049c21 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2041,7 +2041,7 @@ int av_read_pause(AVFormatContext *s)
void av_close_input_file(AVFormatContext *s)
{
- int i, must_open_file;
+ int i;
AVStream *st;
/* free previous packet */
@@ -2068,13 +2068,8 @@ void av_close_input_file(AVFormatContext *s)
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);
}