Enforce 256x256 minimum for streaming

This commit is contained in:
Cameron Gutman committed 2022-02-06 21:09:22 -06:00
1 parent d12c103117
commit bfdfdc3050
1 file changed
+4
@@ -351,6 +351,10 @@ BOOL isCustomResolution(CGSize res) {
// Cap to maximum valid dimensions
width = MIN(width, maxResolutionDimension);
height = MIN(height, maxResolutionDimension);
// Cap to minimum valid dimensions
width = MAX(width, 256);
height = MAX(height, 256);
resolutionTable[RESOLUTION_TABLE_CUSTOM_INDEX] = CGSizeMake(width, height);
[self updateBitrate];