Skip to content

Commit

Permalink
android: fix aspect ratio in preview
Browse files Browse the repository at this point in the history
  • Loading branch information
c-g-owen committed Oct 19, 2021
1 parent e391258 commit 70b334b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions android/java/com/waz/avs/VideoPreview.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ public void setVideoOrientation(int ori) {
protected void onLayout(boolean changed,
int l, int t, int r, int b) {

final float aspectRatio = 4.0f/3.0f;

super.onLayout(changed, l, t, r, b);
this.vWidth = (float)(r - l);
this.vHeight = (float)(b - t);
Expand All @@ -89,10 +87,12 @@ protected void onLayout(boolean changed,

private void updateTransform() {

Matrix m = new Matrix();
if (this.vHeight == 0.0f) {
return;
}

final float aspectRatio = 4.0f/3.0f;
Matrix m = new Matrix();
float vAspRatio = this.vWidth / this.vHeight;
float tAspRatio = aspectRatio;

Expand Down

0 comments on commit 70b334b

Please sign in to comment.