server: Make encoder inert when closing client

pull/80/head
Andri Yngvason 2022-10-30 11:10:03 +00:00
parent baaf84eab9
commit 8f2d137046
1 changed files with 2 additions and 0 deletions

View File

@ -121,6 +121,7 @@ static void client_close(struct nvnc_client* client)
client->server->n_damage_clients -= client->server->n_damage_clients -=
!(client->encoder->impl->flags & !(client->encoder->impl->flags &
ENCODER_IMPL_FLAG_IGNORES_DAMAGE); ENCODER_IMPL_FLAG_IGNORES_DAMAGE);
client->encoder->on_done = NULL;
} }
encoder_unref(client->encoder); encoder_unref(client->encoder);
pixman_region_fini(&client->damage); pixman_region_fini(&client->damage);
@ -660,6 +661,7 @@ static void process_fb_update_requests(struct nvnc_client* client)
server->n_damage_clients -= server->n_damage_clients -=
!(client->encoder->impl->flags & !(client->encoder->impl->flags &
ENCODER_IMPL_FLAG_IGNORES_DAMAGE); ENCODER_IMPL_FLAG_IGNORES_DAMAGE);
client->encoder->on_done = NULL;
} }
encoder_unref(client->encoder); encoder_unref(client->encoder);
client->encoder = encoder_new(encoding, width, height); client->encoder = encoder_new(encoding, width, height);