Skip to content

Commit

Permalink
fix(android): fix backward compatibility (#4020)
Browse files Browse the repository at this point in the history
  • Loading branch information
KrzysztofMoch authored Jul 18, 2024
1 parent 76d5e93 commit ab7e02e
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -238,12 +238,11 @@ private void updateForCurrentTrackSelections(Tracks tracks) {
// There are weird cases when video height and width did not change with rotation so we need change aspect ration to fix it
switch (format.rotationDegrees) {
// update aspect ratio !
case 90, 270 -> {
case 90:
case 270:
layout.setVideoAspectRatio(format.width == 0 ? 1 : (format.height * format.pixelWidthHeightRatio) / format.width);
}
default -> {
default:
layout.setVideoAspectRatio(format.height == 0 ? 1 : (format.width * format.pixelWidthHeightRatio) / format.height);
}
}
return;
}
Expand Down

0 comments on commit ab7e02e

Please sign in to comment.