aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2011-12-11 10:38:28 +0100
committerAnton Khirnov <anton@khirnov.net>2011-12-12 20:34:38 +0100
commitcd3716b9aae7e141e7b4faf9783131809f40991f (patch)
tree242d19f2239d299454d57879582d1ef0f9fe44ca /libavformat
parent526604545fb1cc0c11af356fbffd5cddf8cdc95f (diff)
downloadffmpeg-cd3716b9aae7e141e7b4faf9783131809f40991f.tar.gz
Replace all uses of av_close_input_file() with avformat_close_input().
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/applehttp.c2
-rw-r--r--libavformat/avidec.c2
-rw-r--r--libavformat/mpegts.c2
-rw-r--r--libavformat/rdt.c2
-rw-r--r--libavformat/rtpdec_asf.c3
-rw-r--r--libavformat/rtsp.c3
-rw-r--r--libavformat/sapdec.c2
-rw-r--r--libavformat/seek-test.c2
8 files changed, 8 insertions, 10 deletions
diff --git a/libavformat/applehttp.c b/libavformat/applehttp.c
index 366d8327ff..7cc04999d1 100644
--- a/libavformat/applehttp.c
+++ b/libavformat/applehttp.c
@@ -132,7 +132,7 @@ static void free_variant_list(AppleHTTPContext *c)
ffurl_close(var->input);
if (var->ctx) {
var->ctx->pb = NULL;
- av_close_input_file(var->ctx);
+ avformat_close_input(&var->ctx);
}
av_free(var);
}
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index ad35995b05..b45224f641 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -1365,7 +1365,7 @@ static int avi_read_close(AVFormatContext *s)
if (ast) {
if (ast->sub_ctx) {
av_freep(&ast->sub_ctx->pb);
- av_close_input_file(ast->sub_ctx);
+ avformat_close_input(&ast->sub_ctx);
}
av_free(ast->sub_buffer);
av_free_packet(&ast->sub_pkt);
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 0d25e3f254..c9b34abe1f 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -368,7 +368,7 @@ static void mpegts_close_filter(MpegTSContext *ts, MpegTSFilter *filter)
PESContext *pes = filter->u.pes_filter.opaque;
av_freep(&pes->buffer);
/* referenced private data will be freed later in
- * av_close_input_file */
+ * avformat_close_input */
if (!((PESContext *)filter->u.pes_filter.opaque)->st) {
av_freep(&filter->u.pes_filter.opaque);
}
diff --git a/libavformat/rdt.c b/libavformat/rdt.c
index c06583e105..207fc92542 100644
--- a/libavformat/rdt.c
+++ b/libavformat/rdt.c
@@ -544,7 +544,7 @@ rdt_free_context (PayloadContext *rdt)
av_freep(&rdt->rmst[i]);
}
if (rdt->rmctx)
- av_close_input_file(rdt->rmctx);
+ avformat_close_input(&rdt->rmctx);
av_freep(&rdt->mlti_data);
av_freep(&rdt->rmst);
av_free(rdt);
diff --git a/libavformat/rtpdec_asf.c b/libavformat/rtpdec_asf.c
index 6a8472844c..483b196d62 100644
--- a/libavformat/rtpdec_asf.c
+++ b/libavformat/rtpdec_asf.c
@@ -108,8 +108,7 @@ int ff_wms_parse_sdp_a_line(AVFormatContext *s, const char *p)
"Failed to fix invalid RTSP-MS/ASF min_pktsize\n");
init_packetizer(&pb, buf, len);
if (rt->asf_ctx) {
- av_close_input_file(rt->asf_ctx);
- rt->asf_ctx = NULL;
+ avformat_close_input(&rt->asf_ctx);
}
if (!(rt->asf_ctx = avformat_alloc_context()))
return AVERROR(ENOMEM);
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 52821545ff..fcf168d426 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -580,8 +580,7 @@ void ff_rtsp_close_streams(AVFormatContext *s)
}
av_free(rt->rtsp_streams);
if (rt->asf_ctx) {
- av_close_input_file(rt->asf_ctx);
- rt->asf_ctx = NULL;
+ avformat_close_input(&rt->asf_ctx);
}
av_free(rt->p);
av_free(rt->recvbuf);
diff --git a/libavformat/sapdec.c b/libavformat/sapdec.c
index 6ac7bfd484..531cfd204d 100644
--- a/libavformat/sapdec.c
+++ b/libavformat/sapdec.c
@@ -52,7 +52,7 @@ static int sap_read_close(AVFormatContext *s)
{
struct SAPState *sap = s->priv_data;
if (sap->sdp_ctx)
- av_close_input_file(sap->sdp_ctx);
+ avformat_close_input(&sap->sdp_ctx);
if (sap->ann_fd)
ffurl_close(sap->ann_fd);
av_freep(&sap->sdp);
diff --git a/libavformat/seek-test.c b/libavformat/seek-test.c
index 43dee56fe7..699c693c3f 100644
--- a/libavformat/seek-test.c
+++ b/libavformat/seek-test.c
@@ -127,7 +127,7 @@ int main(int argc, char **argv)
printf("ret:%-10s st:%2d flags:%d ts:%s\n", ret_str(ret), stream_id, i&1, ts_buf);
}
- av_close_input_file(ic);
+ avformat_close_input(&ic);
return 0;
}