Skip to content

Commit

Permalink
macOS CameraPlugin.
Browse files Browse the repository at this point in the history
Fix a slip in commit a6fd91e/
commit 4d8cc8d.  The test for the pixel buffer
being large enough not to need reallocating is thw wrong way around.
  • Loading branch information
eliotmiranda committed Apr 8, 2021
1 parent 7f69e44 commit 5a7aa38
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -128,7 +128,7 @@ - (void)captureOutput:(AVCaptureOutput *)captureOutput
}
else if (currentWidth != width
|| currentHeight != height) {
if (currentWidth * currentHeight < width * height) {
if (currentWidth * currentHeight > width * height) {
if (pixels)
free(pixels);
pixels = malloc(currentWidth * currentHeight * 4);
Expand Down

0 comments on commit 5a7aa38

Please sign in to comment.