From a03e5ea29ec9c0d501da769084cbdc0cb19d8506 Mon Sep 17 00:00:00 2001 From: Single Date: Tue, 5 Nov 2019 16:00:39 +0800 Subject: [PATCH] SGVideoRenderer: Use presentation size to render. --- SGPlayer/Classes/Core/SGRenderer/SGVideoRenderer.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SGPlayer/Classes/Core/SGRenderer/SGVideoRenderer.m b/SGPlayer/Classes/Core/SGRenderer/SGVideoRenderer.m index d49b9a20..aefffe24 100644 --- a/SGPlayer/Classes/Core/SGRenderer/SGVideoRenderer.m +++ b/SGPlayer/Classes/Core/SGRenderer/SGVideoRenderer.m @@ -403,7 +403,7 @@ - (void)drawInMTKView:(MTKView *)view if (drawableSize.width == 0 || drawableSize.height == 0) { return; } - MTLSize textureSize = MTLSizeMake(width, height, 0); + MTLSize textureSize = MTLSizeMake(frame.descriptor.presentationSize.num, frame.descriptor.presentationSize.den, 0); MTLSize layerSize = MTLSizeMake(drawable.texture.width, drawable.texture.height, 0); switch (displayMode) { case SGDisplayModePlane: {