diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-03-30 23:30:55 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-03-30 23:30:55 +0000 |
commit | 72415b2adb2c25f95ceede49001bb97ed9247dbb (patch) | |
tree | 99247889aa61bb7621c966466ea4b84c100207d3 /libavformat/asfdec.c | |
parent | ca6e7708b42e7d33ba3053bcd447d52a077bca25 (diff) | |
download | ffmpeg-72415b2adb2c25f95ceede49001bb97ed9247dbb.tar.gz |
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 'libavformat/asfdec.c')
-rw-r--r-- | libavformat/asfdec.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c index 882614be3d..ab96cc4339 100644 --- a/libavformat/asfdec.c +++ b/libavformat/asfdec.c @@ -236,7 +236,7 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap) asf->hdr.max_bitrate = get_le32(pb); s->packet_size = asf->hdr.max_pktsize; } else if (!guidcmp(&g, &ff_asf_stream_header)) { - enum CodecType type; + enum AVMediaType type; int type_specific_size, sizeX; uint64_t total_size; unsigned int tag1; @@ -265,14 +265,14 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap) test_for_ext_stream_audio = 0; if (!guidcmp(&g, &ff_asf_audio_stream)) { - type = CODEC_TYPE_AUDIO; + type = AVMEDIA_TYPE_AUDIO; } else if (!guidcmp(&g, &ff_asf_video_stream)) { - type = CODEC_TYPE_VIDEO; + type = AVMEDIA_TYPE_VIDEO; } else if (!guidcmp(&g, &ff_asf_command_stream)) { - type = CODEC_TYPE_DATA; + type = AVMEDIA_TYPE_DATA; } else if (!guidcmp(&g, &ff_asf_ext_stream_embed_stream_header)) { test_for_ext_stream_audio = 1; - type = CODEC_TYPE_UNKNOWN; + type = AVMEDIA_TYPE_UNKNOWN; } else { return -1; } @@ -289,7 +289,7 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap) if (test_for_ext_stream_audio) { get_guid(pb, &g); if (!guidcmp(&g, &ff_asf_ext_stream_audio_stream)) { - type = CODEC_TYPE_AUDIO; + type = AVMEDIA_TYPE_AUDIO; is_dvr_ms_audio=1; get_guid(pb, &g); get_le32(pb); @@ -301,7 +301,7 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap) } st->codec->codec_type = type; - if (type == CODEC_TYPE_AUDIO) { + if (type == AVMEDIA_TYPE_AUDIO) { ff_get_wav_header(pb, st->codec, type_specific_size); if (is_dvr_ms_audio) { // codec_id and codec_tag are unreliable in dvr_ms @@ -351,7 +351,7 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap) st->codec->frame_size = 1; break; } - } else if (type == CODEC_TYPE_VIDEO) { + } else if (type == AVMEDIA_TYPE_VIDEO) { get_le32(pb); get_le32(pb); get_byte(pb); @@ -889,8 +889,8 @@ static int ff_asf_parse_packet(AVFormatContext *s, ByteIOContext *pb, AVPacket * asf_st->packet_pos= asf->packet_pos; //printf("new packet: stream:%d key:%d packet_key:%d audio:%d size:%d\n", //asf->stream_index, asf->packet_key_frame, asf_st->pkt.flags & PKT_FLAG_KEY, -//s->streams[asf->stream_index]->codec->codec_type == CODEC_TYPE_AUDIO, asf->packet_obj_size); - if (s->streams[asf->stream_index]->codec->codec_type == CODEC_TYPE_AUDIO) +//s->streams[asf->stream_index]->codec->codec_type == AVMEDIA_TYPE_AUDIO, asf->packet_obj_size); + if (s->streams[asf->stream_index]->codec->codec_type == AVMEDIA_TYPE_AUDIO) asf->packet_key_frame = 1; if (asf->packet_key_frame) asf_st->pkt.flags |= PKT_FLAG_KEY; |