Offset output dts by -1 when num_out >= gop_len, otherwise there will be a gap of 2 dts. Fixes
@@ -183,7 +183,7 @@ kvz_picture* kvz_encoder_feed_frame(input_frame_buffer_t *buf,
dts_out = buf->pts_buffer[dts_idx % gop_buf_size] + buf->delay;
} else {
int dts_idx = buf->num_out - (cfg->gop_len - 1);
- dts_out = buf->pts_buffer[dts_idx % gop_buf_size];
+ dts_out = buf->pts_buffer[dts_idx % gop_buf_size] - 1;
}
}
else {
