[FFmpeg-devel] [PATCH] avformat/mxfenc: use a zero based continuity counter

Marton Balint cus at passwd.hu
Sat Feb 29 20:37:42 EET 2020


The standard does not seem to require the counter to be zero based, but some
checker tools (MyriadBits MXFInspect, Interra Baton) have validations against 0
start...

Fixes ticket #6781.

Signed-off-by: Marton Balint <cus at passwd.hu>
---
 libavformat/mxfenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
index 1d8ad57415..a3cc1ea97b 100644
--- a/libavformat/mxfenc.c
+++ b/libavformat/mxfenc.c
@@ -2671,7 +2671,7 @@ static void mxf_write_system_item(AVFormatContext *s)
     avio_w8(pb, mxf->content_package_rate); // content package rate
     avio_w8(pb, 0x00); // content package type
     avio_wb16(pb, 0x00); // channel handle
-    avio_wb16(pb, (mxf->tc.start + frame) & 0xFFFF); // continuity count, supposed to overflow
+    avio_wb16(pb, frame & 0xFFFF); // continuity count, supposed to overflow
     if (mxf->essence_container_count > 1)
         avio_write(pb, multiple_desc_ul, 16);
     else {
-- 
2.16.4



More information about the ffmpeg-devel mailing list