diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2009-02-12 03:38:08 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2009-02-12 03:38:08 +0000 |
commit | cfa3caf81cd64485b80def8bb2552c2dafac5eb4 (patch) | |
tree | 27e1cf49b34045ca03f279ad183b55fd7a536257 /libavformat/mxfenc.c | |
parent | 2779cdad0787ae99d5bb8014d6e4119f7b4c9c8e (diff) | |
download | ffmpeg-cfa3caf81cd64485b80def8bb2552c2dafac5eb4.tar.gz |
check body partitions count before writing
Originally committed as revision 17175 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mxfenc.c')
-rw-r--r-- | libavformat/mxfenc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c index 75724240a7..d60ffceeee 100644 --- a/libavformat/mxfenc.c +++ b/libavformat/mxfenc.c @@ -1112,7 +1112,7 @@ static void mxf_write_partition(AVFormatContext *s, int bodysid, 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); |