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

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

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

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

libavformat/matroskaenc.c:764:1: <RHS trace>
762. }
763. 
764. static int mkv_write_ass_blocks(AVFormatContext *s, ByteIOContext *pb, AVPacket *pkt)
     ^
765. {
766.     MatroskaMuxContext *mkv = s->priv_data;

libavformat/matroskaenc.c:764:1: Parameter `*pkt->data`
762. }
763. 
764. static int mkv_write_ass_blocks(AVFormatContext *s, ByteIOContext *pb, AVPacket *pkt)
     ^
765. {
766.     MatroskaMuxContext *mkv = s->priv_data;

libavformat/matroskaenc.c:768:5: Assignment
766.     MatroskaMuxContext *mkv = s->priv_data;
767.     int i, layer = 0, max_duration = 0, size, line_size, data_size = pkt->size;
768.     uint8_t *start, *end, *data = pkt->data;
         ^
769.     ebml_master blockgroup;
770.     char buffer[2048];

libavformat/matroskaenc.c:782:9: Assignment
780.             if (!(start = memchr(start, ',', size-(start-data))))
781.                 return max_duration;
782.         size -= start - data;
             ^
783.         sscanf(data, "Dialogue: %d,", &layer);
784.         i = snprintf(buffer, sizeof(buffer), "%"PRId64",%d,",

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