Mercurial > libavformat.hg
diff nutdec.c @ 5910:536e5527c1e0 libavformat
Define AVMediaType enum, and use it instead of enum CodecType, which
is deprecated and will be dropped at the next major bump.
| author | stefano |
|---|---|
| date | Tue, 30 Mar 2010 23:30:55 +0000 |
| parents | b8041f85c327 |
| children | 11bb10c37225 |
line wrap: on
line diff
--- a/nutdec.c Tue Mar 30 15:50:57 2010 +0000 +++ b/nutdec.c Tue Mar 30 23:30:55 2010 +0000 @@ -315,19 +315,19 @@ switch(class) { case 0: - st->codec->codec_type = CODEC_TYPE_VIDEO; + st->codec->codec_type = AVMEDIA_TYPE_VIDEO; st->codec->codec_id = ff_codec_get_id(ff_codec_bmp_tags, tmp); break; case 1: - st->codec->codec_type = CODEC_TYPE_AUDIO; + st->codec->codec_type = AVMEDIA_TYPE_AUDIO; st->codec->codec_id = ff_codec_get_id(ff_codec_wav_tags, tmp); break; case 2: - st->codec->codec_type = CODEC_TYPE_SUBTITLE; + st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE; st->codec->codec_id = ff_codec_get_id(ff_nut_subtitle_tags, tmp); break; case 3: - st->codec->codec_type = CODEC_TYPE_DATA; + st->codec->codec_type = AVMEDIA_TYPE_DATA; break; default: av_log(s, AV_LOG_ERROR, "unknown stream class (%d)\n", class); @@ -349,7 +349,7 @@ get_buffer(bc, st->codec->extradata, st->codec->extradata_size); } - if (st->codec->codec_type == CODEC_TYPE_VIDEO){ + if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO){ GET_V(st->codec->width , tmp > 0) GET_V(st->codec->height, tmp > 0) st->sample_aspect_ratio.num= ff_get_v(bc); @@ -359,7 +359,7 @@ return -1; } ff_get_v(bc); /* csp type */ - }else if (st->codec->codec_type == CODEC_TYPE_AUDIO){ + }else if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO){ GET_V(st->codec->sample_rate , tmp > 0) ff_get_v(bc); // samplerate_den GET_V(st->codec->channels, tmp > 0)
