mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avcodec_get_context_defaults3: set codec_id
Fixes Ticket1996 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
e2e9bee2da
commit
2ae91c86f3
@ -102,6 +102,9 @@ 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)
|
||||||
|
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;
|
||||||
else if(s->codec_type == AVMEDIA_TYPE_VIDEO)
|
else if(s->codec_type == AVMEDIA_TYPE_VIDEO)
|
||||||
|
Loading…
Reference in New Issue
Block a user