Repository navigation
fix(macos): don't write into a held surface on the Metal CPU fallback path - #186
Merged
Merged
Conversation
The Apple ProRes SDK path reads the frame size from every packet and resizes its own pixel buffer to match, but allocated the output frame only once. A later packet with a larger size made the packed-to-planar conversion write past the end of that frame. decode_frame() now drops the frame's buffer when the size or format changes and allocates a new one, checks av_frame_get_buffer(), and rejects packets with a zero width or height. Only builds made with RV_DEPS_APPLE_PRORES_SDK_ZIP_PATH are affected. Signed-off-by: Michael Oliver <mcoliver@gmail.com>
RvWebManager ignored certificate errors for every request it didn't start itself, which includes everything packages send through networkAccessManager(). An invalid or self-signed certificate was accepted without a word, so a man-in-the-middle went unnoticed. Those requests now fail on SSL errors like the ones made with httpGet()/httpPost()/httpPut(), which already default to not ignoring them. Setting UTV_IGNORE_SSL_ERRORS=1 restores the old behaviour for sites whose certificates the system doesn't trust. A refused certificate is always logged with the host, not only when RV_REPORT_QNETWORK_ERRORS is set. The Mu Qt bindings' RvNetworkAccessManager ignored every SSL error unconditionally. Nothing creates one today; it now follows the same rule. Signed-off-by: Michael Oliver <mcoliver@gmail.com>
… path When zero-copy IOSurface interop is unavailable, MetalView presents frames by copying pixels into a single IOSurface it owns. The window server keeps a surface in use for a while after the layer's contents move on, so writing into the same surface each frame can show partly drawn tiles: the checkerboard flicker fixed for the zero-copy path in c1c937a. presentPixelData() now keeps up to eight surfaces and writes into the oldest one IOSurfaceIsInUse() says is free, adding one when every surface is held, and reusing the oldest only when it can't add more. Signed-off-by: Michael Oliver <mcoliver@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #185; review the last commit.
When zero-copy IOSurface interop isn't available,
MetalView::presentPixelData()copied every frame into one IOSurface. The window server keeps a surface in use for a while after the layer moves on, so that path could show the same checkerboard flicker #182 fixed for the zero-copy path.It now keeps up to eight surfaces and writes into the oldest one
IOSurfaceIsInUse()says is free, adding a surface when all are held. It reuses the oldest only when it can't add more.The CPU path only runs when the zero-copy interop fails, so this is checked by compiling, not by hand.