]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/mxfenc.c
ffmdec: fix hypothetical overflows
[ffmpeg] / libavformat / mxfenc.c
index b7e9449209d1e63c09043af993ceb4a3ebc4c195..6a27d2a03bd5d582720364afe57fb9cce1beef94 100644 (file)
@@ -1820,7 +1820,7 @@ static void mxf_write_system_item(AVFormatContext *s)
     avio_w8(pb, 0x04); // content package rate
     avio_w8(pb, 0x00); // content package type
     avio_wb16(pb, 0x00); // channel handle
-    avio_wb16(pb, mxf->tc.start + frame); // continuity count
+    avio_wb16(pb, (mxf->tc.start + frame) & 0xFFFF); // continuity count, supposed to overflow
     if (mxf->essence_container_count > 1)
         avio_write(pb, multiple_desc_ul, 16);
     else {