Skip to content

fix(rtc): keep video pixels pinned through capture and convert FFI re… - #144

Merged
pabloFuente merged 1 commit into
mainfrom
fix/video-frame-buffer-pinning
Oct 27, 2026
Merged

pabloFuente merged 1 commit into
mainfrom
fix/video-frame-buffer-pinning

Conversation

@pabloFuente

Copy link
Copy Markdown
Owner

…quests

VideoFrame.ToProtoInfo() returned DataPtr and the plane pointers from inside a fixed block, so the pin ended before VideoSource.CaptureFrame and VideoFrame.Convert serialized the request and called the native code. A compacting GC in that gap could move the pixel array and leave the FFI reading a stale pointer. This is the same defect fixed for audio in #143.

…quests

VideoFrame.ToProtoInfo() returned DataPtr and the plane pointers from inside a `fixed` block, so the pin ended before VideoSource.CaptureFrame and VideoFrame.Convert serialized the request and called the native code. A compacting GC in that gap could move the pixel array and leave the FFI reading a stale pointer. This is the same defect fixed for audio in #143.
@pabloFuente
pabloFuente merged commit 1557d7c into main Oct 27, 2026
4 checks passed
@pabloFuente
pabloFuente deleted the fix/video-frame-buffer-pinning branch October 27, 2026 11:15
@TheMachinist-d

Copy link
Copy Markdown
Contributor

Could you publish a new Livekit.Rtc.Dotnet NuGet release containing the fix from PR #143?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants