mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2025-12-31 12:09:05 +00:00
Try to prevent invalid aspectRatio of SurfaceView
If the video's hieght is 0, the aspectRatio is set to Float.NaN which can cause further issues. Do not assign invalid values for the aspectRatio.
This commit is contained in:
@@ -100,7 +100,7 @@ public class ExpandableSurfaceView extends SurfaceView {
|
||||
}
|
||||
|
||||
public void setAspectRatio(final float aspectRatio) {
|
||||
if (videoAspectRatio == aspectRatio) {
|
||||
if (videoAspectRatio == aspectRatio || aspectRatio == 0 || !Float.isFinite(aspectRatio)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user