Skip to content

Commit

Permalink
LocalSampleBufferDisplayLayer::enqueueVideoFrame callback needs to ca…
Browse files Browse the repository at this point in the history
…ll assertIsCurrent after checking weakThis

https://bugs.webkit.org/show_bug.cgi?id=258854
rdar://111744695

Reviewed by Eric Carlson.

Covered by existing tests.

* Source/WebCore/platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.mm:
(WebCore::LocalSampleBufferDisplayLayer::enqueueVideoFrame):

Canonical link: https://commits.webkit.org/265762@main
  • Loading branch information
youennf committed Jul 5, 2023
1 parent 3fb0572 commit 821738a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -391,11 +391,11 @@ static inline CGAffineTransform videoTransformationMatrix(VideoFrame& videoFrame
}

m_processingQueue->dispatch([this, weakThis = ThreadSafeWeakPtr { *this }, pixelBuffer = RetainPtr { videoFrame.pixelBuffer() }, presentationTime = videoFrame.presentationTime(), isReconfiguring]() mutable {
assertIsCurrent(workQueue());

auto protectedThis = weakThis.get();
if (!protectedThis)
return;

assertIsCurrent(workQueue());
if (isReconfiguring)
m_isReconfiguring = true;

Expand Down

0 comments on commit 821738a

Please sign in to comment.