summaryrefslogtreecommitdiff
path: root/libavcodec/options.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2011-09-04 11:42:41 +0200
committerAnton Khirnov <anton@khirnov.net>2011-09-07 11:19:43 +0200
commit79eff9132581af69fbbd2674337b75fad29aa306 (patch)
tree598c62f3e4bbbb3714aaaed3ac7bc47cc91e8610 /libavcodec/options.c
parenta7e2b2ccc9e184820f13894de6cb7e49abcb6130 (diff)
downloadffmpeg-79eff9132581af69fbbd2674337b75fad29aa306.tar.gz
AVOptions: deprecate av_opt_set_defaults2
It's a hack which was created to allow for multiple options with different defaults to refer to same field (e.g. 'b' vs 'ab'). There is no need for it anymore.
Diffstat (limited to 'libavcodec/options.c')
-rw-r--r--libavcodec/options.c9
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;