Skip to content

Commit

Permalink
fix: Fix SAR when transmuxing (#6309)
Browse files Browse the repository at this point in the history
  • Loading branch information
avelad authored Feb 28, 2024
1 parent 4a15d06 commit b5d69f0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/transmuxer/h264.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ shaka.transmuxer.H264 = class {
const vSpacingTable = [
1, 11, 11, 11, 33, 11, 11, 11, 33, 11, 11, 33, 99, 3, 2, 1,
];
if (aspectRatioIdc > 0 && aspectRatioIdc < 16) {
if (aspectRatioIdc > 0 && aspectRatioIdc <= 16) {
hSpacing = hSpacingTable[aspectRatioIdc - 1];
vSpacing = vSpacingTable[aspectRatioIdc - 1];
} else if (aspectRatioIdc === 255) {
Expand Down
2 changes: 1 addition & 1 deletion lib/transmuxer/h265.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ shaka.transmuxer.H265 = class {
const sarHeightTable = [
1, 11, 11, 11, 33, 11, 11, 11, 33, 11, 11, 33, 99, 3, 2, 1,
];
if (aspectRatioIdc > 0 && aspectRatioIdc < 16) {
if (aspectRatioIdc > 0 && aspectRatioIdc <= 16) {
sarWidth = sarWidthTable[aspectRatioIdc - 1];
sarHeight = sarHeightTable[aspectRatioIdc - 1];
} else if (aspectRatioIdc === 255) {
Expand Down

0 comments on commit b5d69f0

Please sign in to comment.