diff options
author | Anton Khirnov <anton@khirnov.net> | 2011-06-04 19:36:30 +0400 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2011-06-16 22:24:56 +0400 |
commit | 603b8bc2a109978c8499b06d2556f1433306eca7 (patch) | |
tree | 650ab4c8e3b12888fdeb0f2b9b34057888d96f6f /libavformat/avidec.c | |
parent | 05e84c95c7f0543553af8f0ebd50fb5604e7e2ff (diff) |
Deprecate av_open_input_* and remove their uses.
Deprecate the last remaining member of AVFormatParameters.
Diffstat (limited to 'libavformat/avidec.c')
-rw-r--r-- | libavformat/avidec.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c index dacd230613..85fc794362 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -774,7 +774,11 @@ static int read_gab2_sub(AVStream *st, AVPacket *pkt) { if (!(sub_demuxer = av_probe_input_format2(&pd, 1, &score))) goto error; - if (!av_open_input_stream(&ast->sub_ctx, pb, "", sub_demuxer, NULL)) { + if (!(ast->sub_ctx = avformat_alloc_context())) + goto error; + + ast->sub_ctx->pb = pb; + if (!avformat_open_input(&ast->sub_ctx, "", sub_demuxer, NULL)) { av_read_packet(ast->sub_ctx, &ast->sub_pkt); *st->codec = *ast->sub_ctx->streams[0]->codec; ast->sub_ctx->streams[0]->codec->extradata = NULL; @@ -1334,7 +1338,7 @@ static int avi_read_close(AVFormatContext *s) if (ast) { if (ast->sub_ctx) { av_freep(&ast->sub_ctx->pb); - av_close_input_stream(ast->sub_ctx); + av_close_input_file(ast->sub_ctx); } av_free(ast->sub_buffer); av_free_packet(&ast->sub_pkt); |