libavformat/movenc.c:1235: error: Integer Overflow L2
  ([0, 4294967295] + 1):signed32.

libavformat/movenc.c:1235:10: <LHS trace>
1233.     avio_wb32(pb, 0); /* version & flags */
1234.     avio_wb32(pb, entries); /* entry count */
1235.     for (i = 0; i < entries; i++) {
               ^
1236.         avio_wb32(pb, stts_entries[i].count);
1237.         avio_wb32(pb, stts_entries[i].duration);

libavformat/movenc.c:1235:10: Assignment
1233.     avio_wb32(pb, 0); /* version & flags */
1234.     avio_wb32(pb, entries); /* entry count */
1235.     for (i = 0; i < entries; i++) {
               ^
1236.         avio_wb32(pb, stts_entries[i].count);
1237.         avio_wb32(pb, stts_entries[i].duration);

libavformat/movenc.c:1235:30: Binary operation: ([0, 4294967295] + 1):signed32
1233.     avio_wb32(pb, 0); /* version & flags */
1234.     avio_wb32(pb, entries); /* entry count */
1235.     for (i = 0; i < entries; i++) {
                                   ^
1236.         avio_wb32(pb, stts_entries[i].count);
1237.         avio_wb32(pb, stts_entries[i].duration);

static int mov_write_stts_tag(AVIOContext *pb, MOVTrack *track)
{
    MOVStts *stts_entries = NULL;
    uint32_t entries = -1;
    uint32_t atom_size;
    int i;
    if (track->enc->codec_type == AVMEDIA_TYPE_AUDIO && !track->audio_vbr) {
        stts_entries = av_malloc(sizeof(*stts_entries));
        if (!stts_entries)
            return AVERROR(ENOMEM);
        stts_entries[0].count = track->sample_count;
        stts_entries[0].duration = 1;
        entries = 1;
    } else {
        if (track->entry) {
            stts_entries = av_malloc(track->entry * sizeof(*stts_entries));
            if (!stts_entries)
                return AVERROR(ENOMEM);
        }
        for (i = 0; i < track->entry; i++) {
            int duration = get_cluster_duration(track, i);
            if (i && duration == stts_entries[entries].duration) {
                stts_entries[entries].count++;
            } else {
                entries++;
                stts_entries[entries].duration = duration;
                stts_entries[entries].count = 1;
            }
        }
        entries++;
    }
    atom_size = 16 + (entries * 8);
    avio_wb32(pb, atom_size);
    ffio_wfourcc(pb, "stts");
    avio_wb32(pb, 0);
    avio_wb32(pb, entries);
    for (i = 0; i < entries; i++) {
        avio_wb32(pb, stts_entries[i].count);
        avio_wb32(pb, stts_entries[i].duration);
    }
    av_free(stts_entries);
    return atom_size;
}
['static int mov_write_stts_tag(AVIOContext *pb, MOVTrack *track)\n{\n    MOVStts *stts_entries = NULL;\n    uint32_t entries = -1;\n    uint32_t atom_size;\n    int i;\n    if (track->enc->codec_type == AVMEDIA_TYPE_AUDIO && !track->audio_vbr) {\n        stts_entries = av_malloc(sizeof(*stts_entries));\n        if (!stts_entries)\n            return AVERROR(ENOMEM);\n        stts_entries[0].count = track->sample_count;\n        stts_entries[0].duration = 1;\n        entries = 1;\n    } else {\n        if (track->entry) {\n            stts_entries = av_malloc(track->entry * sizeof(*stts_entries));\n            if (!stts_entries)\n                return AVERROR(ENOMEM);\n        }\n        for (i = 0; i < track->entry; i++) {\n            int duration = get_cluster_duration(track, i);\n            if (i && duration == stts_entries[entries].duration) {\n                stts_entries[entries].count++;\n            } else {\n                entries++;\n                stts_entries[entries].duration = duration;\n                stts_entries[entries].count = 1;\n            }\n        }\n        entries++;\n    }\n    atom_size = 16 + (entries * 8);\n    avio_wb32(pb, atom_size);\n    ffio_wfourcc(pb, "stts");\n    avio_wb32(pb, 0);\n    avio_wb32(pb, entries);\n    for (i = 0; i < entries; i++) {\n        avio_wb32(pb, stts_entries[i].count);\n        avio_wb32(pb, stts_entries[i].duration);\n    }\n    av_free(stts_entries);\n    return atom_size;\n}']