Commit d1d39042 authored by Vadim Kalinsky's avatar Vadim Kalinsky Committed by Michael Niedermayer

avcodec/options: Set AVCodecContext->codec upon initialization.

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent bccae390
...@@ -95,8 +95,10 @@ int avcodec_get_context_defaults3(AVCodecContext *s, const AVCodec *codec) ...@@ -95,8 +95,10 @@ int avcodec_get_context_defaults3(AVCodecContext *s, const AVCodec *codec)
s->av_class = &av_codec_context_class; s->av_class = &av_codec_context_class;
s->codec_type = codec ? codec->type : AVMEDIA_TYPE_UNKNOWN; s->codec_type = codec ? codec->type : AVMEDIA_TYPE_UNKNOWN;
if (codec) if (codec) {
s->codec = codec;
s->codec_id = codec->id; s->codec_id = codec->id;
}
if(s->codec_type == AVMEDIA_TYPE_AUDIO) if(s->codec_type == AVMEDIA_TYPE_AUDIO)
flags= AV_OPT_FLAG_AUDIO_PARAM; flags= AV_OPT_FLAG_AUDIO_PARAM;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment