[LMCS] Free lmcs_aps in correct place

This commit is contained in:
Marko Viitanen 2021-05-04 16:44:05 +03:00
parent 73908b5237
commit e2ebfc946a

View file

@ -754,13 +754,16 @@ void kvz_encoder_state_finalize(encoder_state_t * const state) {
if (!state->parent || (state->parent->slice != state->slice)) { if (!state->parent || (state->parent->slice != state->slice)) {
if (state->encoder_control->cfg.lmcs_enable) {
if (state->slice->lmcs_aps != NULL) {
FREE_POINTER(state->slice->lmcs_aps);
}
}
if (state->encoder_control->cfg.alf_type) { if (state->encoder_control->cfg.alf_type) {
if (state->slice->apss != NULL) { if (state->slice->apss != NULL) {
FREE_POINTER(state->slice->apss); FREE_POINTER(state->slice->apss);
} }
if (state->slice->lmcs_aps != NULL) {
FREE_POINTER(state->slice->lmcs_aps);
}
if (state->slice->tile_group_luma_aps_id != NULL) { if (state->slice->tile_group_luma_aps_id != NULL) {
FREE_POINTER(state->slice->tile_group_luma_aps_id); FREE_POINTER(state->slice->tile_group_luma_aps_id);
} }