playback/player: android: Don't do custom surface width/height calculations if we have no media width/height
This commit is contained in:
parent
00cad0da11
commit
eaed96145e
@ -50,6 +50,11 @@ public class GStreamerSurfaceView extends SurfaceView {
|
||||
// we are given the freedom to do so.
|
||||
@Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
if (media_width == 0 || media_height == 0) {
|
||||
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
||||
return;
|
||||
}
|
||||
|
||||
int width = 0, height = 0;
|
||||
int wmode = View.MeasureSpec.getMode(widthMeasureSpec);
|
||||
int hmode = View.MeasureSpec.getMode(heightMeasureSpec);
|
||||
|
Loading…
x
Reference in New Issue
Block a user