mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-11 20:01:35 +00:00
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
1 changed files with 5 additions and 0 deletions
|
@ -50,6 +50,11 @@ public class GStreamerSurfaceView extends SurfaceView {
|
||||||
// we are given the freedom to do so.
|
// we are given the freedom to do so.
|
||||||
@Override
|
@Override
|
||||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
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 width = 0, height = 0;
|
||||||
int wmode = View.MeasureSpec.getMode(widthMeasureSpec);
|
int wmode = View.MeasureSpec.getMode(widthMeasureSpec);
|
||||||
int hmode = View.MeasureSpec.getMode(heightMeasureSpec);
|
int hmode = View.MeasureSpec.getMode(heightMeasureSpec);
|
||||||
|
|
Loading…
Reference in a new issue