v4l2: fix crash when unplugging

Only remove the v4l2 fd once on disconnect
Make sure we don't use the clock anymore when a link is destroyed.
This commit is contained in:
Wim Taymans 2018-11-22 10:54:57 +01:00
parent 16b6a51b78
commit 49afacd66f
2 changed files with 7 additions and 2 deletions

View file

@ -1288,6 +1288,9 @@ void pw_link_destroy(struct pw_link *link)
if (link->registered)
spa_list_remove(&link->link);
if (link->output->node->clock == link->input->node->clock)
link->input->node->clock = NULL;
input_remove(link, link->input);
output_remove(link, link->output);