aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/applehttp.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2011-06-04 17:36:30 +0200
committerAnton Khirnov <anton@khirnov.net>2011-06-16 20:24:56 +0200
commit603b8bc2a109978c8499b06d2556f1433306eca7 (patch)
tree650ab4c8e3b12888fdeb0f2b9b34057888d96f6f /libavformat/applehttp.c
parent05e84c95c7f0543553af8f0ebd50fb5604e7e2ff (diff)
downloadffmpeg-603b8bc2a109978c8499b06d2556f1433306eca7.tar.gz
Deprecate av_open_input_* and remove their uses.
Deprecate the last remaining member of AVFormatParameters.
Diffstat (limited to 'libavformat/applehttp.c')
-rw-r--r--libavformat/applehttp.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/libavformat/applehttp.c b/libavformat/applehttp.c
index 86e8b5fbce..38f33a24f3 100644
--- a/libavformat/applehttp.c
+++ b/libavformat/applehttp.c
@@ -473,6 +473,11 @@ static int applehttp_read_header(AVFormatContext *s, AVFormatParameters *ap)
if (v->n_segments == 0)
continue;
+ if (!(v->ctx = avformat_alloc_context())) {
+ ret = AVERROR(ENOMEM);
+ goto fail;
+ }
+
v->index = i;
v->needed = 1;
v->parent = s;
@@ -491,8 +496,8 @@ static int applehttp_read_header(AVFormatContext *s, AVFormatParameters *ap)
NULL, 0, 0);
if (ret < 0)
goto fail;
- ret = av_open_input_stream(&v->ctx, &v->pb, v->segments[0]->url,
- in_fmt, NULL);
+ v->ctx->pb = &v->pb;
+ ret = avformat_open_input(&v->ctx, v->segments[0]->url, in_fmt, NULL);
if (ret < 0)
goto fail;
v->stream_offset = stream_offset;