libavformat/mxfenc.c:1177: error: Integer Overflow L2
  ([1, 531] - 20):unsigned32.

libavformat/mxfenc.c:1174:20: <LHS trace>
1172. static void mxf_write_klv_fill(AVFormatContext *s)
1173. {
1174.     unsigned pad = klv_fill_size(url_ftell(s->pb));
                         ^
1175.     if (pad) {
1176.         avio_write(s->pb, klv_fill_key, 16);

libavformat/mxfenc.c:1174:20: Call
1172. static void mxf_write_klv_fill(AVFormatContext *s)
1173. {
1174.     unsigned pad = klv_fill_size(url_ftell(s->pb));
                         ^
1175.     if (pad) {
1176.         avio_write(s->pb, klv_fill_key, 16);

libavformat/mxfenc.c:1030:1: Parameter `size`
  1028. }
  1029. 
  1030. static unsigned klv_fill_size(uint64_t size)
        ^
  1031. {
  1032.     unsigned pad = KAG_SIZE - (size & (KAG_SIZE-1));

libavformat/mxfenc.c:1032:5: Assignment
  1030. static unsigned klv_fill_size(uint64_t size)
  1031. {
  1032.     unsigned pad = KAG_SIZE - (size & (KAG_SIZE-1));
            ^
  1033.     if (pad < 20) // smallest fill item possible
  1034.         return pad + KAG_SIZE;

libavformat/mxfenc.c:1034:9: Assignment
  1032.     unsigned pad = KAG_SIZE - (size & (KAG_SIZE-1));
  1033.     if (pad < 20) // smallest fill item possible
  1034.         return pad + KAG_SIZE;
                ^
  1035.     else
  1036.         return pad & (KAG_SIZE-1);

libavformat/mxfenc.c:1174:5: Assignment
1172. static void mxf_write_klv_fill(AVFormatContext *s)
1173. {
1174.     unsigned pad = klv_fill_size(url_ftell(s->pb));
          ^
1175.     if (pad) {
1176.         avio_write(s->pb, klv_fill_key, 16);

libavformat/mxfenc.c:1177:9: Binary operation: ([1, 531] - 20):unsigned32
1175.     if (pad) {
1176.         avio_write(s->pb, klv_fill_key, 16);
1177.         pad -= 16 + 4;
              ^
1178.         klv_encode_ber4_length(s->pb, pad);
1179.         for (; pad; pad--)

static void mxf_write_klv_fill(AVFormatContext *s)
{
    unsigned pad = klv_fill_size(url_ftell(s->pb));
    if (pad) {
        avio_write(s->pb, klv_fill_key, 16);
        pad -= 16 + 4;
        klv_encode_ber4_length(s->pb, pad);
        for (; pad; pad--)
            avio_w8(s->pb, 0);
        assert(!(url_ftell(s->pb) & (KAG_SIZE-1)));
    }
}
['static void mxf_write_klv_fill(AVFormatContext *s)\n{\n    unsigned pad = klv_fill_size(url_ftell(s->pb));\n    if (pad) {\n        avio_write(s->pb, klv_fill_key, 16);\n        pad -= 16 + 4;\n        klv_encode_ber4_length(s->pb, pad);\n        for (; pad; pad--)\n            avio_w8(s->pb, 0);\n        assert(!(url_ftell(s->pb) & (KAG_SIZE-1)));\n    }\n}', 'static unsigned klv_fill_size(uint64_t size)\n{\n    unsigned pad = KAG_SIZE - (size & (KAG_SIZE-1));\n    if (pad < 20)\n        return pad + KAG_SIZE;\n    else\n        return pad & (KAG_SIZE-1);\n}']