Revision bf31d93a

View differences:

libavformat/mxfenc.c
1051 1051
        unsigned header_byte_count;
1052 1052

  
1053 1053
        mxf_write_klv_fill(s);
1054

  
1055 1054
        start = url_ftell(s->pb);
1056 1055
        mxf_write_primer_pack(s);
1057 1056
        mxf_write_header_metadata_sets(s);
......
1330 1329
        mxf->header_written = 1;
1331 1330
    }
1332 1331

  
1333
    mxf_write_klv_fill(s);
1334

  
1335 1332
    if (st->index == 0) {
1336 1333
        mxf->index_entries[mxf->edit_units_count].offset = url_ftell(pb);
1337 1334

  
1338
        mxf_write_system_item(s);
1339 1335
        mxf_write_klv_fill(s);
1336
        mxf_write_system_item(s);
1340 1337

  
1341 1338
        mxf->edit_units_count++;
1342 1339
    } else if (st->index == 1) {
......
1344 1341
            url_ftell(pb) - mxf->index_entries[mxf->edit_units_count-1].offset;
1345 1342
    }
1346 1343

  
1344
    mxf_write_klv_fill(s);
1347 1345
    put_buffer(pb, sc->track_essence_element_key, 16); // write key
1348 1346
    klv_encode_ber_length(pb, pkt->size); // write length
1349 1347
    put_buffer(pb, pkt->data, pkt->size); // write value
......
1385 1383
    index_byte_count += klv_fill_size(index_byte_count);
1386 1384

  
1387 1385
    mxf_write_klv_fill(s);
1388

  
1389 1386
    mxf->footer_partition_offset = url_ftell(pb);
1390 1387
    mxf_write_partition(s, 0, 2, index_byte_count, footer_partition_key, 0);
1391 1388

  
1392 1389
    mxf_write_klv_fill(s);
1393

  
1394 1390
    mxf_write_index_table_segment(s);
1395 1391

  
1396 1392
    mxf_write_klv_fill(s);
1397

  
1398 1393
    mxf_write_random_index_pack(s);
1399 1394

  
1400 1395
    if (!url_is_streamed(s->pb)) {

Also available in: Unified diff