You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
check body partitions count before writing
Originally committed as revision 17175 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@@ -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)
|
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
|
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
|
put_be64(pb, mxf->body_partition_offset[mxf->body_partitions_count-1]); // PreviousPartition
|
||||||
else
|
else
|
||||||
put_be64(pb, 0);
|
put_be64(pb, 0);
|
||||||
|
Reference in New Issue
Block a user