diff options
Diffstat (limited to 'libavcodec/options.c')
-rw-r--r-- | libavcodec/options.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/libavcodec/options.c b/libavcodec/options.c index 098778aa23..7d14beba6a 100644 --- a/libavcodec/options.c +++ b/libavcodec/options.c @@ -519,19 +519,12 @@ static const AVOption options[]={ static const AVClass av_codec_context_class = { "AVCodecContext", context_to_name, options, LIBAVUTIL_VERSION_INT, OFFSET(log_level_offset), .opt_find = opt_find}; void avcodec_get_context_defaults2(AVCodecContext *s, enum AVMediaType codec_type){ - int flags=0; memset(s, 0, sizeof(AVCodecContext)); s->av_class= &av_codec_context_class; s->codec_type = codec_type; - if(codec_type == AVMEDIA_TYPE_AUDIO) - flags= AV_OPT_FLAG_AUDIO_PARAM; - else if(codec_type == AVMEDIA_TYPE_VIDEO) - flags= AV_OPT_FLAG_VIDEO_PARAM; - else if(codec_type == AVMEDIA_TYPE_SUBTITLE) - flags= AV_OPT_FLAG_SUBTITLE_PARAM; - av_opt_set_defaults2(s, flags, flags); + av_opt_set_defaults(s); s->time_base= (AVRational){0,1}; s->get_buffer= avcodec_default_get_buffer; |