summaryrefslogtreecommitdiff
path: root/libavformat/utils.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2011-12-11 10:01:46 +0100
committerAnton Khirnov <anton@khirnov.net>2011-12-12 20:21:47 +0100
commit3a7f7678eb3be1f9a28414c9908ed8d34b1b9846 (patch)
tree4f74061acc8f586c6273ceea7bdaab77cd9c6e2a /libavformat/utils.c
parent59826cab8ad9f64bf5fd752f52c6acc16815dbb0 (diff)
lavf: deprecate av_close_input_stream().
And remove all its uses.
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r--libavformat/utils.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 8b749ad7fc..8a76cb815e 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2632,6 +2632,7 @@ int av_read_pause(AVFormatContext *s)
return AVERROR(ENOSYS);
}
+#if FF_API_FORMAT_PARAMETERS
void av_close_input_stream(AVFormatContext *s)
{
flush_packet_queue(s);
@@ -2639,6 +2640,7 @@ void av_close_input_stream(AVFormatContext *s)
s->iformat->read_close(s);
avformat_free_context(s);
}
+#endif
void avformat_free_context(AVFormatContext *s)
{
@@ -2686,7 +2688,10 @@ void av_close_input_file(AVFormatContext *s)
{
AVIOContext *pb = (s->iformat->flags & AVFMT_NOFILE) || (s->flags & AVFMT_FLAG_CUSTOM_IO) ?
NULL : s->pb;
- av_close_input_stream(s);
+ flush_packet_queue(s);
+ if (s->iformat->read_close)
+ s->iformat->read_close(s);
+ avformat_free_context(s);
if (pb)
avio_close(pb);
}