Mercurial > libavformat.hg
changeset 4460:21945a5288cb libavformat
check body partitions count before writing
author | bcoudurier |
---|---|
date | Thu, 12 Feb 2009 03:38:08 +0000 |
parents | 241532434509 |
children | f21c01140f2d |
files | mxfenc.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mxfenc.c Thu Feb 12 02:17:16 2009 +0000 +++ b/mxfenc.c Thu Feb 12 03:38:08 2009 +0000 @@ -1112,7 +1112,7 @@ if (!memcmp(key, body_partition_key, 16) && mxf->body_partitions_count > 1) put_be64(pb, mxf->body_partition_offset[mxf->body_partitions_count-2]); // PreviousPartition - else if (!memcmp(key, footer_partition_key, 16)) + else if (!memcmp(key, footer_partition_key, 16) && mxf->body_partitions_count) put_be64(pb, mxf->body_partition_offset[mxf->body_partitions_count-1]); // PreviousPartition else put_be64(pb, 0);