From 72415b2adb2c25f95ceede49001bb97ed9247dbb Mon Sep 17 00:00:00 2001 From: Stefano Sabatini Date: Tue, 30 Mar 2010 23:30:55 +0000 Subject: 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 --- libavformat/libnut.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libavformat/libnut.c') diff --git a/libavformat/libnut.c b/libavformat/libnut.c index f23e70dc08..365a545234 100644 --- a/libavformat/libnut.c +++ b/libavformat/libnut.c @@ -77,14 +77,14 @@ static int nut_write_header(AVFormatContext * avf) { int fourcc = 0; int num, denom, ssize; - s[i].type = codec->codec_type == CODEC_TYPE_VIDEO ? NUT_VIDEO_CLASS : NUT_AUDIO_CLASS; + s[i].type = codec->codec_type == AVMEDIA_TYPE_VIDEO ? NUT_VIDEO_CLASS : NUT_AUDIO_CLASS; if (codec->codec_tag) fourcc = codec->codec_tag; else fourcc = ff_codec_get_tag(nut_tags, codec->codec_id); if (!fourcc) { - if (codec->codec_type == CODEC_TYPE_VIDEO) fourcc = ff_codec_get_tag(ff_codec_bmp_tags, codec->codec_id); - if (codec->codec_type == CODEC_TYPE_AUDIO) fourcc = ff_codec_get_tag(ff_codec_wav_tags, codec->codec_id); + if (codec->codec_type == AVMEDIA_TYPE_VIDEO) fourcc = ff_codec_get_tag(ff_codec_bmp_tags, codec->codec_id); + if (codec->codec_type == AVMEDIA_TYPE_AUDIO) fourcc = ff_codec_get_tag(ff_codec_wav_tags, codec->codec_id); } s[i].fourcc_len = 4; @@ -102,7 +102,7 @@ static int nut_write_header(AVFormatContext * avf) { s[i].codec_specific_len = codec->extradata_size; s[i].codec_specific = codec->extradata; - if (codec->codec_type == CODEC_TYPE_VIDEO) { + if (codec->codec_type == AVMEDIA_TYPE_VIDEO) { s[i].width = codec->width; s[i].height = codec->height; s[i].sample_width = 0; @@ -234,14 +234,14 @@ static int nut_read_header(AVFormatContext * avf, AVFormatParameters * ap) { switch(s[i].type) { case NUT_AUDIO_CLASS: - st->codec->codec_type = CODEC_TYPE_AUDIO; + st->codec->codec_type = AVMEDIA_TYPE_AUDIO; if (st->codec->codec_id == CODEC_ID_NONE) st->codec->codec_id = ff_codec_get_id(ff_codec_wav_tags, st->codec->codec_tag); st->codec->channels = s[i].channel_count; st->codec->sample_rate = s[i].samplerate_num / s[i].samplerate_denom; break; case NUT_VIDEO_CLASS: - st->codec->codec_type = CODEC_TYPE_VIDEO; + st->codec->codec_type = AVMEDIA_TYPE_VIDEO; if (st->codec->codec_id == CODEC_ID_NONE) st->codec->codec_id = ff_codec_get_id(ff_codec_bmp_tags, st->codec->codec_tag); st->codec->width = s[i].width; -- cgit v1.2.3