Revision 72415b2a libavformat/flvenc.c

View differences:

libavformat/flvenc.c
166 166

  
167 167
    for(i=0; i<s->nb_streams; i++){
168 168
        AVCodecContext *enc = s->streams[i]->codec;
169
        if (enc->codec_type == CODEC_TYPE_VIDEO) {
169
        if (enc->codec_type == AVMEDIA_TYPE_VIDEO) {
170 170
            if (s->streams[i]->r_frame_rate.den && s->streams[i]->r_frame_rate.num) {
171 171
                framerate = av_q2d(s->streams[i]->r_frame_rate);
172 172
            } else {
......
275 275
        AVCodecContext *enc = s->streams[i]->codec;
276 276
        if (enc->codec_id == CODEC_ID_AAC || enc->codec_id == CODEC_ID_H264) {
277 277
            int64_t pos;
278
            put_byte(pb, enc->codec_type == CODEC_TYPE_VIDEO ?
278
            put_byte(pb, enc->codec_type == AVMEDIA_TYPE_VIDEO ?
279 279
                     FLV_TAG_TYPE_VIDEO : FLV_TAG_TYPE_AUDIO);
280 280
            put_be24(pb, 0); // size patched later
281 281
            put_be24(pb, 0); // ts
......
342 342
    else
343 343
        flags_size= 1;
344 344

  
345
    if (enc->codec_type == CODEC_TYPE_VIDEO) {
345
    if (enc->codec_type == AVMEDIA_TYPE_VIDEO) {
346 346
        put_byte(pb, FLV_TAG_TYPE_VIDEO);
347 347

  
348 348
        flags = enc->codec_tag;
......
353 353

  
354 354
        flags |= pkt->flags & PKT_FLAG_KEY ? FLV_FRAME_KEY : FLV_FRAME_INTER;
355 355
    } else {
356
        assert(enc->codec_type == CODEC_TYPE_AUDIO);
356
        assert(enc->codec_type == AVMEDIA_TYPE_AUDIO);
357 357
        flags = get_audio_flags(enc);
358 358

  
359 359
        assert(size);

Also available in: Unified diff