summaryrefslogtreecommitdiff
path: root/libavcodec/options.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/options.c')
-rw-r--r--libavcodec/options.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/libavcodec/options.c b/libavcodec/options.c
index eae0205640..89b25483c2 100644
--- a/libavcodec/options.c
+++ b/libavcodec/options.c
@@ -423,18 +423,18 @@ static const AVOption options[]={
static const AVClass av_codec_context_class = { "AVCodecContext", context_to_name, options };
-void avcodec_get_context_defaults2(AVCodecContext *s, enum CodecType codec_type){
+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 == CODEC_TYPE_AUDIO)
+ if(codec_type == AVMEDIA_TYPE_AUDIO)
flags= AV_OPT_FLAG_AUDIO_PARAM;
- else if(codec_type == CODEC_TYPE_VIDEO)
+ else if(codec_type == AVMEDIA_TYPE_VIDEO)
flags= AV_OPT_FLAG_VIDEO_PARAM;
- else if(codec_type == CODEC_TYPE_SUBTITLE)
+ else if(codec_type == AVMEDIA_TYPE_SUBTITLE)
flags= AV_OPT_FLAG_SUBTITLE_PARAM;
av_opt_set_defaults2(s, flags, flags);
@@ -453,7 +453,7 @@ void avcodec_get_context_defaults2(AVCodecContext *s, enum CodecType codec_type)
s->reordered_opaque= AV_NOPTS_VALUE;
}
-AVCodecContext *avcodec_alloc_context2(enum CodecType codec_type){
+AVCodecContext *avcodec_alloc_context2(enum AVMediaType codec_type){
AVCodecContext *avctx= av_malloc(sizeof(AVCodecContext));
if(avctx==NULL) return NULL;
@@ -464,10 +464,10 @@ AVCodecContext *avcodec_alloc_context2(enum CodecType codec_type){
}
void avcodec_get_context_defaults(AVCodecContext *s){
- avcodec_get_context_defaults2(s, CODEC_TYPE_UNKNOWN);
+ avcodec_get_context_defaults2(s, AVMEDIA_TYPE_UNKNOWN);
}
AVCodecContext *avcodec_alloc_context(void){
- return avcodec_alloc_context2(CODEC_TYPE_UNKNOWN);
+ return avcodec_alloc_context2(AVMEDIA_TYPE_UNKNOWN);
}