Revision 72415b2a libavformat/mxfenc.c

View differences:

libavformat/mxfenc.c
1415 1415
            return AVERROR(ENOMEM);
1416 1416
        st->priv_data = sc;
1417 1417

  
1418
        if (st->codec->codec_type == CODEC_TYPE_VIDEO) {
1418
        if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
1419 1419
            if (i != 0) {
1420 1420
                av_log(s, AV_LOG_ERROR, "video stream must be first track\n");
1421 1421
                return -1;
......
1455 1455
                mxf->edit_unit_byte_count += 16 + 4 + 4 + samples_per_frame[0]*8*4;
1456 1456
                mxf->edit_unit_byte_count += klv_fill_size(mxf->edit_unit_byte_count);
1457 1457
            }
1458
        } else if (st->codec->codec_type == CODEC_TYPE_AUDIO) {
1458
        } else if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
1459 1459
            if (st->codec->sample_rate != 48000) {
1460 1460
                av_log(s, AV_LOG_ERROR, "only 48khz is implemented\n");
1461 1461
                return -1;
......
1717 1717
    mxf_write_klv_fill(s);
1718 1718
    put_buffer(pb, sc->track_essence_element_key, 16); // write key
1719 1719
    if (s->oformat == &mxf_d10_muxer) {
1720
        if (st->codec->codec_type == CODEC_TYPE_VIDEO)
1720
        if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO)
1721 1721
            mxf_write_d10_video_packet(s, st, pkt);
1722 1722
        else
1723 1723
            mxf_write_d10_audio_packet(s, st, pkt);

Also available in: Unified diff