Browse Source

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: Martin Storsjö <martin@martin.st>
tags/n0.9
Martin Storsjö 14 years ago
parent
commit
cae4f4b77e
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      libavcodec/options.c

+ 1
- 0
libavcodec/options.c View File

@@ -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



Loading…
Cancel
Save