Force clearing of references when GOP not used and I-slice

This commit is contained in:
Marko Viitanen 2015-03-30 10:21:24 +03:00
parent f28ebbcd41
commit d6f68d0950

View file

@ -721,6 +721,8 @@ static void encoder_state_remove_refs(encoder_state_t *state) {
if (encoder->cfg->gop_len) {
refnumber = encoder->cfg->gop[state->global->gop_offset].ref_neg_count + encoder->cfg->gop[state->global->gop_offset].ref_pos_count;
check_refs = 1;
} else if (state->global->slicetype == SLICE_I) {
refnumber = 1;
}
// Remove the ref pic (if present)
while (check_refs || state->global->ref->used_size > (uint32_t)refnumber) {