# HG changeset patch # User bcoudurier # Date 1234250631 0 # Node ID 4f96c60c9561ec0e1443ec2f5685b52bf8dcd9e1 # Parent a75d42745d16d049fca41253cfefcb54ddd1020c cosmetics, associate mxf_write_klv_fill to aligned elements diff -r a75d42745d16 -r 4f96c60c9561 mxfenc.c --- a/mxfenc.c Tue Feb 10 06:14:39 2009 +0000 +++ b/mxfenc.c Tue Feb 10 07:23:51 2009 +0000 @@ -1051,7 +1051,6 @@ unsigned header_byte_count; mxf_write_klv_fill(s); - start = url_ftell(s->pb); mxf_write_primer_pack(s); mxf_write_header_metadata_sets(s); @@ -1330,13 +1329,11 @@ mxf->header_written = 1; } - mxf_write_klv_fill(s); - if (st->index == 0) { mxf->index_entries[mxf->edit_units_count].offset = url_ftell(pb); + mxf_write_klv_fill(s); mxf_write_system_item(s); - mxf_write_klv_fill(s); mxf->edit_units_count++; } else if (st->index == 1) { @@ -1344,6 +1341,7 @@ url_ftell(pb) - mxf->index_entries[mxf->edit_units_count-1].offset; } + mxf_write_klv_fill(s); put_buffer(pb, sc->track_essence_element_key, 16); // write key klv_encode_ber_length(pb, pkt->size); // write length put_buffer(pb, pkt->data, pkt->size); // write value @@ -1385,16 +1383,13 @@ index_byte_count += klv_fill_size(index_byte_count); mxf_write_klv_fill(s); - mxf->footer_partition_offset = url_ftell(pb); mxf_write_partition(s, 0, 2, index_byte_count, footer_partition_key, 0); mxf_write_klv_fill(s); - mxf_write_index_table_segment(s); mxf_write_klv_fill(s); - mxf_write_random_index_pack(s); if (!url_is_streamed(s->pb)) {