Skip to content

Commit

Permalink
Merge pull request #6 from nextcloud-releases/metal-video-patch-ios
Browse files Browse the repository at this point in the history
  • Loading branch information
SystemKeeper authored Feb 10, 2023
2 parents 06ed22b + 8c5f9b3 commit af2a953
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ gclient sync
cd src
git checkout -b branch_$BRANCH branch-heads/$BRANCH
gclient sync -D
git apply {path-to-this-repo}/ios/patches/RTCMTLVideoView.patch
cd tools_webrtc/ios
python build_ios_libs.py
```
Expand Down
13 changes: 13 additions & 0 deletions ios/patches/RTCMTLVideoView.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/sdk/objc/components/renderer/metal/RTCMTLVideoView.m b/sdk/objc/components/renderer/metal/RTCMTLVideoView.m
index c5d9e4385f..1865391f31 100644
--- a/sdk/objc/components/renderer/metal/RTCMTLVideoView.m
+++ b/sdk/objc/components/renderer/metal/RTCMTLVideoView.m
@@ -139,7 +139,7 @@
NSAssert(view == self.metalView, @"Receiving draw callbacks from foreign instance.");
RTC_OBJC_TYPE(RTCVideoFrame) *videoFrame = self.videoFrame;
// Skip rendering if we've already rendered this frame.
- if (!videoFrame || videoFrame.width <= 0 || videoFrame.height <= 0 ||
+ if (!videoFrame || videoFrame.width <= 1 || videoFrame.height <= 1 ||
videoFrame.timeStampNs == self.lastFrameTimeNs) {
return;
}

0 comments on commit af2a953

Please sign in to comment.