Commit fd8d641b authored by reimar's avatar reimar

Simplify av_close_input_file similarly to av_open_input_file previously


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@11254 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent d7f6ee0b
...@@ -2041,7 +2041,7 @@ int av_read_pause(AVFormatContext *s) ...@@ -2041,7 +2041,7 @@ int av_read_pause(AVFormatContext *s)
void av_close_input_file(AVFormatContext *s) void av_close_input_file(AVFormatContext *s)
{ {
int i, must_open_file; int i;
AVStream *st; AVStream *st;
/* free previous packet */ /* free previous packet */
...@@ -2068,13 +2068,8 @@ void av_close_input_file(AVFormatContext *s) ...@@ -2068,13 +2068,8 @@ void av_close_input_file(AVFormatContext *s)
av_freep(&s->programs[i]); av_freep(&s->programs[i]);
} }
flush_packet_queue(s); flush_packet_queue(s);
must_open_file = 1; if (!(s->iformat->flags & AVFMT_NOFILE))
if (s->iformat->flags & AVFMT_NOFILE) {
must_open_file = 0;
}
if (must_open_file) {
url_fclose(s->pb); url_fclose(s->pb);
}
av_freep(&s->priv_data); av_freep(&s->priv_data);
av_free(s); av_free(s);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment