Fix race condition with OWF

There was an off by one error in the dependance setting code, which
resulted in dependencies not being set resulting in checksum errors.
For example if ref_neg=1 and owf=1.
This commit is contained in:
Ari Koivula 2016-03-07 13:38:23 +02:00
parent 81b439f4da
commit fd34dd9bc6

View file

@ -316,7 +316,7 @@ static void encoder_state_encode_leaf(encoder_state_t * const state) {
{
// For LP-gop, depend on the state of the first reference.
int ref_neg = cfg->gop[(state->global->poc - 1) % cfg->gop_len].ref_neg[0];
if (ref_neg >= state->encoder_control->owf) {
if (ref_neg > state->encoder_control->owf) {
// If frame is not within OWF range, it's already done.
ref_state = NULL;
} else {