diff --git a/videolayout/src/main/java/egolabsapps/basicodemine/videolayout/VideoLayout.java b/videolayout/src/main/java/egolabsapps/basicodemine/videolayout/VideoLayout.java index 06566b5..acdb12e 100644 --- a/videolayout/src/main/java/egolabsapps/basicodemine/videolayout/VideoLayout.java +++ b/videolayout/src/main/java/egolabsapps/basicodemine/videolayout/VideoLayout.java @@ -151,18 +151,7 @@ private void updateTextureViewSize(int viewWidth, int viewHeight) { if (VIDEO_GRAVITY == 4) { pivotPointX = 0; pivotPointY = viewHeight / 2; - - if (mVideoWidth > viewWidth && mVideoHeight > viewHeight) { - scaleX = mVideoWidth / viewWidth; - scaleY = mVideoHeight / viewHeight; - } else if (mVideoWidth < viewWidth && mVideoHeight < viewHeight) { - scaleY = viewWidth / mVideoWidth; - scaleX = viewHeight / mVideoHeight; - } - - scaleY = scaleY / 2; - scaleX = scaleX / 2; - + scaleY = (viewWidth / mVideoWidth) / (viewHeight / mVideoHeight); matrix.setScale(scaleX, scaleY, pivotPointX, pivotPointY); } else { if (mVideoWidth > viewWidth && mVideoHeight > viewHeight) {