Avoid divide by 0 error
Didn't actually see this in the wild - just being defensive. // FREEBIE
This commit is contained in:
parent
3864880a6f
commit
4c797151e6
|
@ -152,6 +152,11 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
- (void)videoView:(RTCEAGLVideoView *)videoView didChangeVideoSize:(CGSize)remoteVideoSize
|
||||
{
|
||||
AssertIsOnMainThread();
|
||||
if (remoteVideoSize.height <= 0) {
|
||||
OWSFail(@"Illegal video height: %f", remoteVideoSize.height);
|
||||
return;
|
||||
}
|
||||
|
||||
CGFloat aspectRatio = remoteVideoSize.width / remoteVideoSize.height;
|
||||
|
||||
DDLogVerbose(@"%@ Remote video size: width: %f height: %f ratio: %f",
|
||||
|
|
Loading…
Reference in New Issue