diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c index b7e9449209..6a27d2a03b 100644 --- a/libavformat/mxfenc.c +++ b/libavformat/mxfenc.c @@ -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 {