summaryrefslogtreecommitdiff
path: root/libavcodec/options.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2010-03-30 23:30:55 +0000
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2010-03-30 23:30:55 +0000
commit72415b2adb2c25f95ceede49001bb97ed9247dbb (patch)
tree99247889aa61bb7621c966466ea4b84c100207d3 /libavcodec/options.c
parentca6e7708b42e7d33ba3053bcd447d52a077bca25 (diff)
Define AVMediaType enum, and use it instead of enum CodecType, which
is deprecated and will be dropped at the next major bump. Originally committed as revision 22735 to svn://svn.ffmpeg.org/ffmpeg/trunk
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);
}