libavformat/matroskaenc.c:760: error: Integer Overflow R2
  ([0, +oo] + [-oo, +oo]):signed32.

libavformat/matroskaenc.c:758:13: <LHS trace>
756.         size -= start - data;
757.         sscanf(data, "Dialogue: %d,", &layer);
758.         i = snprintf(buffer, sizeof(buffer), "%"PRId64",%d,",
                 ^
759.                      s->streams[pkt->stream_index]->nb_frames++, layer);
760.         size = FFMIN(i+size, sizeof(buffer));

libavformat/matroskaenc.c:758:13: Risky value from: snprintf
756.         size -= start - data;
757.         sscanf(data, "Dialogue: %d,", &layer);
758.         i = snprintf(buffer, sizeof(buffer), "%"PRId64",%d,",
                 ^
759.                      s->streams[pkt->stream_index]->nb_frames++, layer);
760.         size = FFMIN(i+size, sizeof(buffer));

libavformat/matroskaenc.c:758:9: Assignment
756.         size -= start - data;
757.         sscanf(data, "Dialogue: %d,", &layer);
758.         i = snprintf(buffer, sizeof(buffer), "%"PRId64",%d,",
             ^
759.                      s->streams[pkt->stream_index]->nb_frames++, layer);
760.         size = FFMIN(i+size, sizeof(buffer));

libavformat/matroskaenc.c:737:1: <RHS trace>
735. }
736. 
737. static int mkv_write_ass_blocks(AVFormatContext *s, AVPacket *pkt)
     ^
738. {
739.     MatroskaMuxContext *mkv = s->priv_data;

libavformat/matroskaenc.c:737:1: Parameter `*pkt->data`
735. }
736. 
737. static int mkv_write_ass_blocks(AVFormatContext *s, AVPacket *pkt)
     ^
738. {
739.     MatroskaMuxContext *mkv = s->priv_data;

libavformat/matroskaenc.c:742:5: Assignment
740.     ByteIOContext *pb = s->pb;
741.     int i, layer = 0, max_duration = 0, size, line_size, data_size = pkt->size;
742.     uint8_t *start, *end, *data = pkt->data;
         ^
743.     ebml_master blockgroup;
744.     char buffer[2048];

libavformat/matroskaenc.c:756:9: Assignment
754.             if (!(start = memchr(start, ',', size-(start-data))))
755.                 return max_duration;
756.         size -= start - data;
             ^
757.         sscanf(data, "Dialogue: %d,", &layer);
758.         i = snprintf(buffer, sizeof(buffer), "%"PRId64",%d,",

libavformat/matroskaenc.c:760:16: Binary operation: ([0, +oo] + [-oo, +oo]):signed32
758.         i = snprintf(buffer, sizeof(buffer), "%"PRId64",%d,",
759.                      s->streams[pkt->stream_index]->nb_frames++, layer);
760.         size = FFMIN(i+size, sizeof(buffer));
                    ^
761.         memcpy(buffer+i, start, size-i);
762. 
