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

libavformat/matroskaenc.c:936:16: <LHS trace>
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. 

libavformat/matroskaenc.c:936:16: Assignment
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. 

libavformat/matroskaenc.c:936:9: Assignment
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. 

libavformat/matroskaenc.c:934:13: <RHS 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:937:9: Binary operation: ([-oo, +oo] - [0, +oo]):signed32
935.                      s->streams[pkt->stream_index]->nb_frames, layer);
936.         size = FFMIN(i+size, sizeof(buffer));
937.         memcpy(buffer+i, start, size-i);
             ^
938. 
939.         av_log(s, AV_LOG_DEBUG, "Writing block at offset %" PRIu64 ", size %d, "
