Skip to content
Snippets Groups Projects
Commit cae4f4b7 authored by Martin Storsjö's avatar Martin Storsjö
Browse files

avcodec: Make sure codec_type is set by avcodec_get_context_defaults2


This function used to set codec_type. With the current fallback
implementation based on avcodec_get_context_defaults3, codec_type
won't be set to the value passed in, but will be set to
AVMEDIA_TYPE_UNKNOWN. Legacy callers of this function might expect
this field to be set to the value passed in.

Signed-off-by: default avatarMartin Storsjö <martin@martin.st>
parent 1b6da627
No related branches found
No related tags found
No related merge requests found
......@@ -539,6 +539,7 @@ static const AVClass av_codec_context_class = {
#if FF_API_ALLOC_CONTEXT
void avcodec_get_context_defaults2(AVCodecContext *s, enum AVMediaType codec_type){
avcodec_get_context_defaults3(s, NULL);
s->codec_type = codec_type;
}
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment