mirror of
https://github.com/games-on-whales/gst-wayland-display.git
synced 2026-10-15 21:02:00 +00:00
[PR #54] [MERGED] fix(cuda): stop clearing a pool the query still owns #55
Labels
No labels
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
games-on-whales/gst-wayland-display#55
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/games-on-whales/gst-wayland-display/pull/54
Author: @JBailes
Created: 8/16/2026
Status: ✅ Merged
Merged: 8/16/2026
Merged by: @JBailes
Base:
stable← Head:fix/cuda-pool-clear-object📝 Commits (1)
01027bafix(cuda): stop clearing a pool the query still owns📊 Changes
1 file changed (+3 additions, -1 deletions)
View changed files
📝
gst-plugin-wayland-display/src/waylandsrc/imp.rs(+3 -1)📄 Description
decide_allocation()released a downstream pool it does not own, through a call whose type is wrong in a way the compiler cannot see:gst_clear_objecttakes aGstObject **.pool.as_ptr()is aGstBufferPool *. Theas *mut _lets inference supply*mut *mut GstObjectfrom the parameter type, so the cast is legal and it compiles without a warning. At runtime the call dereferences one level too far and treats the pool's first field,GTypeInstance.g_class, as the pointer to clear.Measured on GStreamer 1.26.2 against a plain
gst_buffer_pool_new()with the same cast:g_object_unref: assertion 'G_IS_OBJECT (object)' failed, as the call tries to unref the class vtable. GLib's check refuses it, so the vtable itself survives.gst_buffer_pool_set_active: assertion 'GST_IS_BUFFER_POOL (pool)' failed.That is the outcome with GLib checks compiled in, which is the Debian and Ubuntu default. Under
G_DISABLE_CHECKSthe first unref is not refused and the class vtable's refcount is decremented instead. I have not built that configuration.The release was never needed, which is the part worth keeping.
query.allocation_pools()parses withgst_query_parse_nth_allocation_pool, which is (transfer full), so the returnedVecowns theBufferPooland drops it at the end of the scope. Deleting the line is the whole fix.Reachable only when the CUDA path is live and downstream offers a pool that is not a CUDA buffer pool, so it has stayed quiet.
The same line is on feat/vulkan-encode at imp.rs:1100 and needs the same removal there.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.