Skip to content

Commit

Permalink
Fix bad reference to frameRate on Variant
Browse files Browse the repository at this point in the history
This is only defined on Stream, not Variant.  This bug has was
introduced in PR shaka-project#2332 and the v2.5.8 release and affects v2.5.8 -
v2.5.10.  The corresponding feature (frameRate restrictions) has
actually never worked.

This was caught by a compiler upgrade which is still in progress.

Change-Id: I0409d9be8d3f6eb0794775ca29f28b98208bab4f
  • Loading branch information
joeyparrish committed Apr 27, 2020
1 parent 423e6c9 commit 0911a6b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/util/stream_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ shaka.util.StreamUtils = class {

// |variant.frameRate| can be undefined, which breaks
// the math, so make sure they are there first.
if (variant && variant.frameRate) {
if (!inRange(variant.frameRate,
if (variant && variant.video && variant.video.frameRate) {
if (!inRange(variant.video.frameRate,
restrictions.minFrameRate,
restrictions.maxFrameRate)) {
return false;
Expand Down

0 comments on commit 0911a6b

Please sign in to comment.