diff options
author | éclairevoyant <848000+eclairevoyant@users.noreply.github.com> | 2024-04-10 09:31:25 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-10 09:31:25 +0000 |
commit | b2cf36f43f9ef2ded5711b30b1f393ac423d8f72 (patch) | |
tree | 052a57ae3e06d1ca96ddad52cbbca85fcfa303b4 /pkgs | |
parent | a48721e9b7a55253eb0a4d79b6806e97f11a9c77 (diff) | |
parent | 7f7b189877ecce02c070d1e6a969a2b344e06c41 (diff) |
Merge pull request #299868 from NixOS/backport-295569-to-release-23.11
[Backport release-23.11] linuxPackages.v4l2loopback: unstable-2023-11-23 -> 0.12.7-unstable-2024-02-12
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/os-specific/linux/v4l2loopback/default.nix | 6 | ||||
-rw-r--r-- | pkgs/os-specific/linux/v4l2loopback/revert-pr518.patch | 55 |
2 files changed, 3 insertions, 58 deletions
diff --git a/pkgs/os-specific/linux/v4l2loopback/default.nix b/pkgs/os-specific/linux/v4l2loopback/default.nix index 3d16748f05a2e..1c4a20ae85fed 100644 --- a/pkgs/os-specific/linux/v4l2loopback/default.nix +++ b/pkgs/os-specific/linux/v4l2loopback/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation { pname = "v4l2loopback"; - version = "unstable-2023-11-23-${kernel.version}"; + version = "0.12.7-unstable-2024-02-12-${kernel.version}"; src = fetchFromGitHub { owner = "umlaeute"; repo = "v4l2loopback"; - rev = "850a2e36849f6ad3c9bf74f2ae3f603452bd8a71"; - hash = "sha256-LqP5R3oKbjUQUfDZUWpkrmyopWhOt4wlgSgGywTPJXM="; + rev = "5d72c17f92ee0e38efbb7eb85e34443ecbf1a80c"; + hash = "sha256-ggmYH5MUXhMPvA8UZ2EAG+eGoPTNbw7B8UxmmgP6CsE="; }; hardeningDisable = [ "format" "pic" ]; diff --git a/pkgs/os-specific/linux/v4l2loopback/revert-pr518.patch b/pkgs/os-specific/linux/v4l2loopback/revert-pr518.patch deleted file mode 100644 index d5d2564c32c42..0000000000000 --- a/pkgs/os-specific/linux/v4l2loopback/revert-pr518.patch +++ /dev/null @@ -1,55 +0,0 @@ -diff --git a/v4l2loopback.c b/v4l2loopback.c -index 2ab1f76..2514f09 100644 ---- a/v4l2loopback.c -+++ b/v4l2loopback.c -@@ -92,17 +92,6 @@ MODULE_LICENSE("GPL"); - } \ - } while (0) - --/* TODO: Make sure that function is never interrupted. */ --static inline int mod_inc(int *number, int mod) --{ -- int result; -- result = (*number + 1) % mod; -- if (unlikely(result < 0)) -- result += mod; -- *number = result; -- return result; --} -- - static inline void v4l2l_get_timestamp(struct v4l2_buffer *b) - { - /* ktime_get_ts is considered deprecated, so use ktime_get_ts64 if possible */ -@@ -1424,8 +1413,9 @@ static int vidioc_reqbufs(struct file *file, void *fh, - i = dev->write_position; - list_for_each_entry(pos, &dev->outbufs_list, - list_head) { -- dev->bufpos2index[mod_inc(&i, b->count)] = -+ dev->bufpos2index[i % b->count] = - pos->buffer.index; -+ ++i; - } - } - -@@ -1489,9 +1479,10 @@ static void buffer_written(struct v4l2_loopback_device *dev, - del_timer_sync(&dev->timeout_timer); - spin_lock_bh(&dev->lock); - -- dev->bufpos2index[mod_inc(&dev->write_position, dev->used_buffers)] = -+ dev->bufpos2index[dev->write_position % dev->used_buffers] = - buf->buffer.index; - list_move_tail(&buf->list_head, &dev->outbufs_list); -+ ++dev->write_position; - dev->reread_count = 0; - - check_timers(dev); -@@ -1586,7 +1577,8 @@ static int get_capture_buffer(struct file *file) - if (dev->write_position > - opener->read_position + dev->used_buffers) - opener->read_position = dev->write_position - 1; -- pos = mod_inc(&opener->read_position, dev->used_buffers); -+ pos = opener->read_position % dev->used_buffers; -+ ++opener->read_position; - } - timeout_happened = dev->timeout_happened; - dev->timeout_happened = 0; |