diff options
author | Vadim Kalinsky <vkalinsky@Q.local> | 2014-11-12 20:25:45 +0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-11-18 20:46:30 +0300 |
commit | d1d390427342308ffe70e8c4a8a742e4dd63fba1 (patch) | |
tree | 32d7f34ec68c5960df5954bc4c0ce1c605040cf4 /libavcodec | |
parent | bccae39072c4bf2cf20d52900fecbf9c71de9b7e (diff) |
avcodec/options: Set AVCodecContext->codec upon initialization.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/options.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/options.c b/libavcodec/options.c index 5437770553..9713e8d33e 100644 --- a/libavcodec/options.c +++ b/libavcodec/options.c @@ -95,8 +95,10 @@ int avcodec_get_context_defaults3(AVCodecContext *s, const AVCodec *codec) s->av_class = &av_codec_context_class; s->codec_type = codec ? codec->type : AVMEDIA_TYPE_UNKNOWN; - if (codec) + if (codec) { + s->codec = codec; s->codec_id = codec->id; + } if(s->codec_type == AVMEDIA_TYPE_AUDIO) flags= AV_OPT_FLAG_AUDIO_PARAM; |