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

libavformat/mxfenc.c:1167:20: <LHS trace>
1165. static void mxf_write_klv_fill(AVFormatContext *s)
1166. {
1167.     unsigned pad = klv_fill_size(url_ftell(s->pb));
                         ^
1168.     if (pad) {
1169.         put_buffer(s->pb, klv_fill_key, 16);

libavformat/mxfenc.c:1167:20: Call
1165. static void mxf_write_klv_fill(AVFormatContext *s)
1166. {
1167.     unsigned pad = klv_fill_size(url_ftell(s->pb));
                         ^
1168.     if (pad) {
1169.         put_buffer(s->pb, klv_fill_key, 16);

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

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

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

libavformat/mxfenc.c:1167:5: Assignment
1165. static void mxf_write_klv_fill(AVFormatContext *s)
1166. {
1167.     unsigned pad = klv_fill_size(url_ftell(s->pb));
          ^
1168.     if (pad) {
1169.         put_buffer(s->pb, klv_fill_key, 16);

libavformat/mxfenc.c:1170:9: Binary operation: ([1, 531] - 20):unsigned32
1168.     if (pad) {
1169.         put_buffer(s->pb, klv_fill_key, 16);
1170.         pad -= 16 + 4;
              ^
1171.         klv_encode_ber4_length(s->pb, pad);
1172.         for (; pad; pad--)

static void mxf_write_klv_fill(AVFormatContext *s)
{
    unsigned pad = klv_fill_size(url_ftell(s->pb));
    if (pad) {
        put_buffer(s->pb, klv_fill_key, 16);
        pad -= 16 + 4;
        klv_encode_ber4_length(s->pb, pad);
        for (; pad; pad--)
            put_byte(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        put_buffer(s->pb, klv_fill_key, 16);\n        pad -= 16 + 4;\n        klv_encode_ber4_length(s->pb, pad);\n        for (; pad; pad--)\n            put_byte(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}']