Revision 72415b2a libavformat/rtpenc.c

View differences:

libavformat/rtpenc.c
78 78

  
79 79
    s->payload_type = ff_rtp_get_payload_type(st->codec);
80 80
    if (s->payload_type < 0)
81
        s->payload_type = RTP_PT_PRIVATE + (st->codec->codec_type == CODEC_TYPE_AUDIO);
81
        s->payload_type = RTP_PT_PRIVATE + (st->codec->codec_type == AVMEDIA_TYPE_AUDIO);
82 82

  
83 83
    s->base_timestamp = ff_random_get_seed();
84 84
    s->timestamp = s->base_timestamp;
......
102 102

  
103 103
    s->max_frames_per_packet = 0;
104 104
    if (s1->max_delay) {
105
        if (st->codec->codec_type == CODEC_TYPE_AUDIO) {
105
        if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
106 106
            if (st->codec->frame_size == 0) {
107 107
                av_log(s1, AV_LOG_ERROR, "Cannot respect max delay: frame size = 0\n");
108 108
            } else {
109 109
                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);
110 110
            }
111 111
        }
112
        if (st->codec->codec_type == CODEC_TYPE_VIDEO) {
112
        if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
113 113
            /* FIXME: We should round down here... */
114 114
            s->max_frames_per_packet = av_rescale_q(s1->max_delay, (AVRational){1, 1000000}, st->codec->time_base);
115 115
        }
......
151 151
    case CODEC_ID_AAC:
152 152
        s->num_frames = 0;
153 153
    default:
154
        if (st->codec->codec_type == CODEC_TYPE_AUDIO) {
154
        if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
155 155
            av_set_pts_info(st, 32, 1, st->codec->sample_rate);
156 156
        }
157 157
        s->buf_ptr = s->buf;

Also available in: Unified diff