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/raw.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'libavformat/raw.c') diff --git a/libavformat/raw.c b/libavformat/raw.c index b2e3ae8aa8..7837de842a 100644 --- a/libavformat/raw.c +++ b/libavformat/raw.c @@ -74,14 +74,14 @@ static int raw_read_header(AVFormatContext *s, AVFormatParameters *ap) id = s->iformat->value; if (id == CODEC_ID_RAWVIDEO) { - st->codec->codec_type = CODEC_TYPE_VIDEO; + st->codec->codec_type = AVMEDIA_TYPE_VIDEO; } else { - st->codec->codec_type = CODEC_TYPE_AUDIO; + st->codec->codec_type = AVMEDIA_TYPE_AUDIO; } st->codec->codec_id = id; switch(st->codec->codec_type) { - case CODEC_TYPE_AUDIO: + case AVMEDIA_TYPE_AUDIO: st->codec->sample_rate = ap->sample_rate; if(ap->channels) st->codec->channels = ap->channels; else st->codec->channels = 1; @@ -90,7 +90,7 @@ static int raw_read_header(AVFormatContext *s, AVFormatParameters *ap) st->codec->block_align = st->codec->bits_per_coded_sample*st->codec->channels/8; av_set_pts_info(st, 64, 1, st->codec->sample_rate); break; - case CODEC_TYPE_VIDEO: + case AVMEDIA_TYPE_VIDEO: if(ap->time_base.num) av_set_pts_info(st, 64, ap->time_base.num, ap->time_base.den); else @@ -253,7 +253,7 @@ static int audio_read_header(AVFormatContext *s, AVStream *st = av_new_stream(s, 0); if (!st) return AVERROR(ENOMEM); - st->codec->codec_type = CODEC_TYPE_AUDIO; + st->codec->codec_type = AVMEDIA_TYPE_AUDIO; st->codec->codec_id = s->iformat->value; st->need_parsing = AVSTREAM_PARSE_FULL; /* the parameters will be extracted from the compressed bitstream */ @@ -271,7 +271,7 @@ static int video_read_header(AVFormatContext *s, if (!st) return AVERROR(ENOMEM); - st->codec->codec_type = CODEC_TYPE_VIDEO; + st->codec->codec_type = AVMEDIA_TYPE_VIDEO; st->codec->codec_id = s->iformat->value; st->need_parsing = AVSTREAM_PARSE_FULL; @@ -700,7 +700,7 @@ static int adts_aac_read_header(AVFormatContext *s, if (!st) return AVERROR(ENOMEM); - st->codec->codec_type = CODEC_TYPE_AUDIO; + st->codec->codec_type = AVMEDIA_TYPE_AUDIO; st->codec->codec_id = s->iformat->value; st->need_parsing = AVSTREAM_PARSE_FULL; -- cgit v1.2.3