Skip to content

Commit

Permalink
Merge pull request obsproject#36 from amazon-contributing/ruwen/fix-l…
Browse files Browse the repository at this point in the history
…ow-canvas-res-scaling

simulcast: Use canvas resolution as upper limit for scaled pixel count
  • Loading branch information
palana committed Aug 17, 2023
2 parents 64257bc + 8d9b1ce commit 36770d6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/simulcast/src/simulcast-output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ static pixel_resolution scale_resolution(const obs_video_info &ovi,
auto base_pixels =
static_cast<uint64_t>(ovi.base_width) * ovi.base_height;

auto requested_pixels = requested_width * requested_height;
auto requested_pixels =
std::min(requested_width * requested_height, base_pixels);

auto pixel_ratio = std::min(
requested_pixels / static_cast<double>(base_pixels), 1.0);
Expand Down

0 comments on commit 36770d6

Please sign in to comment.