Revision 72415b2a libavformat/matroskaenc.c

View differences:

libavformat/matroskaenc.c
475 475
            ret = ff_isom_write_avcc(dyn_cp, codec->extradata, codec->extradata_size);
476 476
        else if (codec->extradata_size)
477 477
            put_buffer(dyn_cp, codec->extradata, codec->extradata_size);
478
    } else if (codec->codec_type == CODEC_TYPE_VIDEO) {
478
    } else if (codec->codec_type == AVMEDIA_TYPE_VIDEO) {
479 479
        if (qt_id) {
480 480
            if (!codec->codec_tag)
481 481
                codec->codec_tag = ff_codec_get_tag(codec_movvideo_tags, codec->codec_id);
......
492 492
            ff_put_bmp_header(dyn_cp, codec, ff_codec_bmp_tags, 0);
493 493
        }
494 494

  
495
    } else if (codec->codec_type == CODEC_TYPE_AUDIO) {
495
    } else if (codec->codec_type == AVMEDIA_TYPE_AUDIO) {
496 496
        unsigned int tag;
497 497
        tag = ff_codec_get_tag(ff_codec_wav_tags, codec->codec_id);
498 498
        if (!tag) {
......
565 565
        }
566 566

  
567 567
        switch (codec->codec_type) {
568
            case CODEC_TYPE_VIDEO:
568
            case AVMEDIA_TYPE_VIDEO:
569 569
                put_ebml_uint(pb, MATROSKA_ID_TRACKTYPE, MATROSKA_TRACK_TYPE_VIDEO);
570 570

  
571 571
                if (!native_id &&
......
596 596
                end_ebml_master(pb, subinfo);
597 597
                break;
598 598

  
599
            case CODEC_TYPE_AUDIO:
599
            case AVMEDIA_TYPE_AUDIO:
600 600
                put_ebml_uint(pb, MATROSKA_ID_TRACKTYPE, MATROSKA_TRACK_TYPE_AUDIO);
601 601

  
602 602
                if (!native_id)
......
613 613
                end_ebml_master(pb, subinfo);
614 614
                break;
615 615

  
616
            case CODEC_TYPE_SUBTITLE:
616
            case AVMEDIA_TYPE_SUBTITLE:
617 617
                put_ebml_uint(pb, MATROSKA_ID_TRACKTYPE, MATROSKA_TRACK_TYPE_SUBTITLE);
618 618
                break;
619 619
            default:
......
893 893
        av_md5_update(mkv->md5_ctx, pkt->data, FFMIN(200, pkt->size));
894 894
    }
895 895

  
896
    if (codec->codec_type != CODEC_TYPE_SUBTITLE) {
896
    if (codec->codec_type != AVMEDIA_TYPE_SUBTITLE) {
897 897
        mkv_write_block(s, pb, MATROSKA_ID_SIMPLEBLOCK, pkt, keyframe << 7);
898 898
    } else if (codec->codec_id == CODEC_ID_SSA) {
899 899
        duration = mkv_write_ass_blocks(s, pb, pkt);
......
905 905
        end_ebml_master(pb, blockgroup);
906 906
    }
907 907

  
908
    if (codec->codec_type == CODEC_TYPE_VIDEO && keyframe) {
908
    if (codec->codec_type == AVMEDIA_TYPE_VIDEO && keyframe) {
909 909
        ret = mkv_add_cuepoint(mkv->cues, pkt->stream_index, ts, mkv->cluster_pos);
910 910
        if (ret < 0) return ret;
911 911
    }

Also available in: Unified diff