lavc: introduce avcodec_open2() as a replacement for avcodec_open().

Adds support for decoder-private options and makes setting other options
simpler.
(cherry picked from commit 0b950fe240)

Conflicts:

	libavcodec/avcodec.h

Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:
Anton Khirnov
2011-05-22 14:10:49 +02:00
parent 58decdb639
commit 47953c33ea
7 changed files with 69 additions and 5 deletions

View File

@@ -139,7 +139,7 @@ static int movie_init(AVFilterContext *ctx)
return AVERROR(EINVAL);
}
if ((ret = avcodec_open(movie->codec_ctx, codec)) < 0) {
if ((ret = avcodec_open2(movie->codec_ctx, codec, NULL)) < 0) {
av_log(ctx, AV_LOG_ERROR, "Failed to open codec\n");
return ret;
}