mirror of
https://github.com/samsonjs/media.git
synced 2026-04-07 11:35:46 +00:00
Fix green screen problem when using VpxRenderer.
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=120689946
This commit is contained in:
parent
854acaa1ac
commit
ab615682b5
1 changed files with 4 additions and 1 deletions
|
|
@ -78,6 +78,7 @@ import javax.microedition.khronos.opengles.GL10;
|
|||
private int program;
|
||||
private int texLocation;
|
||||
private int colorMatrixLocation;
|
||||
private FloatBuffer textureCoords;
|
||||
private int previousWidth;
|
||||
private int previousStride;
|
||||
|
||||
|
|
@ -170,7 +171,9 @@ import javax.microedition.khronos.opengles.GL10;
|
|||
// Set cropping of stride if either width or stride has changed.
|
||||
if (previousWidth != outputBuffer.width || previousStride != outputBuffer.yuvStrides[0]) {
|
||||
float crop = (float) outputBuffer.width / outputBuffer.yuvStrides[0];
|
||||
FloatBuffer textureCoords = nativeFloatBuffer(
|
||||
// This buffer is consumed during each call to glDrawArrays. It needs to be a member variable
|
||||
// rather than a local variable to ensure that it doesn't get garbage collected.
|
||||
textureCoords = nativeFloatBuffer(
|
||||
0.0f, 0.0f,
|
||||
0.0f, 1.0f,
|
||||
crop, 0.0f,
|
||||
|
|
|
|||
Loading…
Reference in a new issue