avformat/mxfenc: fix index byte count in partition header
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>
Thu, 18 Jul 2019 17:35:00 +0000 (10:35 -0700)
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>
Mon, 22 Jul 2019 20:17:42 +0000 (13:17 -0700)
libavformat/mxfenc.c

index b677f6a..2e54320 100644 (file)
@@ -1944,8 +1944,7 @@ static int mxf_write_partition(AVFormatContext *s, int bodysid,
         index_byte_count = 80;
 
     if (index_byte_count) {
-        // add encoded ber length
-        index_byte_count += 16 + klv_ber_length(index_byte_count);
+        index_byte_count += 16 + 4; // add encoded ber4 length
         index_byte_count += klv_fill_size(index_byte_count);
     }