Mercurial > libavformat.hg
comparison mxfenc.c @ 4460:21945a5288cb libavformat
check body partitions count before writing
author | bcoudurier |
---|---|
date | Thu, 12 Feb 2009 03:38:08 +0000 |
parents | aaae79b414f3 |
children | f21c01140f2d |
comparison
equal
deleted
inserted
replaced
4459:241532434509 | 4460:21945a5288cb |
---|---|
1110 | 1110 |
1111 put_be64(pb, partition_offset); // ThisPartition | 1111 put_be64(pb, partition_offset); // ThisPartition |
1112 | 1112 |
1113 if (!memcmp(key, body_partition_key, 16) && mxf->body_partitions_count > 1) | 1113 if (!memcmp(key, body_partition_key, 16) && mxf->body_partitions_count > 1) |
1114 put_be64(pb, mxf->body_partition_offset[mxf->body_partitions_count-2]); // PreviousPartition | 1114 put_be64(pb, mxf->body_partition_offset[mxf->body_partitions_count-2]); // PreviousPartition |
1115 else if (!memcmp(key, footer_partition_key, 16)) | 1115 else if (!memcmp(key, footer_partition_key, 16) && mxf->body_partitions_count) |
1116 put_be64(pb, mxf->body_partition_offset[mxf->body_partitions_count-1]); // PreviousPartition | 1116 put_be64(pb, mxf->body_partition_offset[mxf->body_partitions_count-1]); // PreviousPartition |
1117 else | 1117 else |
1118 put_be64(pb, 0); | 1118 put_be64(pb, 0); |
1119 | 1119 |
1120 put_be64(pb, mxf->footer_partition_offset); // footerPartition | 1120 put_be64(pb, mxf->footer_partition_offset); // footerPartition |