mirror of
https://gitlab.freedesktop.org/pipewire/pipewire
synced 2024-10-06 16:09:43 +00:00
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:
parent
170f31dedc
commit
0651e12ad8
|
@ -744,9 +744,11 @@ static int v4l2_close(int fd)
|
||||||
if ((file = remove_fd_map(fd)) == NULL)
|
if ((file = remove_fd_map(fd)) == NULL)
|
||||||
return globals.old_fops.close(fd);
|
return globals.old_fops.close(fd);
|
||||||
|
|
||||||
|
if (fd != file->fd)
|
||||||
|
spa_system_close(file->l->system, fd);
|
||||||
|
|
||||||
unref_file(file);
|
unref_file(file);
|
||||||
|
|
||||||
pw_log_info("fd:%d closed", fd);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue