Handle RateControl being undef

pull/4202/head
Isaac Connor 2023-07-27 11:47:02 -04:00
parent 2d06dc98a1
commit 6a5abeca83
1 changed files with 3 additions and 1 deletions

View File

@ -309,6 +309,8 @@ sub profiles {
my $Resolution = $VideoEncoderConfiguration->get_Resolution();
my $Width = $Resolution ? $Resolution->get_Width() : 0;
my $Height = $Resolution ? $Resolution->get_Height() : 0;
my $RateControl = $VideoEncoderConfiguration->get_RateControl();
my $FrameRateLimit = $RateControl ? $RateControl->get_FrameRateLimit() : 0;
push @profiles, [
$token,
@ -316,7 +318,7 @@ sub profiles {
$VideoEncoderConfiguration->get_Encoding(),
$Width,
$Height,
$VideoEncoderConfiguration->get_RateControl()->get_FrameRateLimit(),
$FrameRateLimit,
$streamtype,
$Uri,
];