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

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

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

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

libavformat/matroskaenc.c:914:1: <RHS trace>
912. }
913. 
914. static int mkv_write_ass_blocks(AVFormatContext *s, AVIOContext *pb, AVPacket *pkt)
     ^
915. {
916.     MatroskaMuxContext *mkv = s->priv_data;

libavformat/matroskaenc.c:914:1: Parameter `*pkt->data`
912. }
913. 
914. static int mkv_write_ass_blocks(AVFormatContext *s, AVIOContext *pb, AVPacket *pkt)
     ^
915. {
916.     MatroskaMuxContext *mkv = s->priv_data;

libavformat/matroskaenc.c:918:5: Assignment
916.     MatroskaMuxContext *mkv = s->priv_data;
917.     int i, layer = 0, max_duration = 0, size, line_size, data_size = pkt->size;
918.     uint8_t *start, *end, *data = pkt->data;
         ^
919.     ebml_master blockgroup;
920.     char buffer[2048];

libavformat/matroskaenc.c:932:9: Assignment
930.             if (!(start = memchr(start, ',', size-(start-data))))
931.                 return max_duration;
932.         size -= start - data;
             ^
933.         sscanf(data, "Dialogue: %d,", &layer);
934.         i = snprintf(buffer, sizeof(buffer), "%"PRId64",%d,",

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