pipewire-v4l2: actually close file descriptors

Close every file descriptor of a given `struct file` object
in `v4l2_close()` apart from the "main" file descriptor.
This commit is contained in:
Barnabás Pőcze 2021-10-14 22:08:18 +02:00 committed by Wim Taymans
parent 170f31dedc
commit 0651e12ad8

View File

@ -744,9 +744,11 @@ static int v4l2_close(int fd)
if ((file = remove_fd_map(fd)) == NULL)
return globals.old_fops.close(fd);
if (fd != file->fd)
spa_system_close(file->l->system, fd);
unref_file(file);
pw_log_info("fd:%d closed", fd);
return 0;
}