summaryrefslogtreecommitdiff
path: root/libavformat/rtpenc.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 /libavformat/rtpenc.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 'libavformat/rtpenc.c')
-rw-r--r--libavformat/rtpenc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c
index c5441b8312..5df101eb04 100644
--- a/libavformat/rtpenc.c
+++ b/libavformat/rtpenc.c
@@ -78,7 +78,7 @@ static int rtp_write_header(AVFormatContext *s1)
s->payload_type = ff_rtp_get_payload_type(st->codec);
if (s->payload_type < 0)
- s->payload_type = RTP_PT_PRIVATE + (st->codec->codec_type == CODEC_TYPE_AUDIO);
+ s->payload_type = RTP_PT_PRIVATE + (st->codec->codec_type == AVMEDIA_TYPE_AUDIO);
s->base_timestamp = ff_random_get_seed();
s->timestamp = s->base_timestamp;
@@ -102,14 +102,14 @@ static int rtp_write_header(AVFormatContext *s1)
s->max_frames_per_packet = 0;
if (s1->max_delay) {
- if (st->codec->codec_type == CODEC_TYPE_AUDIO) {
+ if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
if (st->codec->frame_size == 0) {
av_log(s1, AV_LOG_ERROR, "Cannot respect max delay: frame size = 0\n");
} else {
s->max_frames_per_packet = av_rescale_rnd(s1->max_delay, st->codec->sample_rate, AV_TIME_BASE * st->codec->frame_size, AV_ROUND_DOWN);
}
}
- if (st->codec->codec_type == CODEC_TYPE_VIDEO) {
+ if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
/* FIXME: We should round down here... */
s->max_frames_per_packet = av_rescale_q(s1->max_delay, (AVRational){1, 1000000}, st->codec->time_base);
}
@@ -151,7 +151,7 @@ static int rtp_write_header(AVFormatContext *s1)
case CODEC_ID_AAC:
s->num_frames = 0;
default:
- if (st->codec->codec_type == CODEC_TYPE_AUDIO) {
+ if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
av_set_pts_info(st, 32, 1, st->codec->sample_rate);
}
s->buf_ptr = s->buf;