mirror of
https://github.com/samsonjs/media.git
synced 2026-03-29 10:05:48 +00:00
Fix output viewport size of empty FrameProcessorChain.
Since the output size can be overridden, the viewport should be ouputWidth/Height and NOT the ExternalCopyFrameProcessor's output size which matches the input size. PiperOrigin-RevId: 437256635
This commit is contained in:
parent
202a82a915
commit
d1394780ec
1 changed files with 4 additions and 6 deletions
|
|
@ -398,18 +398,16 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
|
|||
private void processFrame() {
|
||||
checkState(Thread.currentThread().equals(glThread));
|
||||
|
||||
Size outputSize = inputSizes.get(0);
|
||||
if (frameProcessors.isEmpty()) {
|
||||
GlUtil.focusEglSurface(
|
||||
eglDisplay, eglContext, eglSurface, outputSize.getWidth(), outputSize.getHeight());
|
||||
GlUtil.focusEglSurface(eglDisplay, eglContext, eglSurface, outputWidth, outputHeight);
|
||||
} else {
|
||||
GlUtil.focusFramebuffer(
|
||||
eglDisplay,
|
||||
eglContext,
|
||||
eglSurface,
|
||||
framebuffers[0],
|
||||
outputSize.getWidth(),
|
||||
outputSize.getHeight());
|
||||
inputSizes.get(0).getWidth(),
|
||||
inputSizes.get(0).getHeight());
|
||||
}
|
||||
inputSurfaceTexture.updateTexImage();
|
||||
inputSurfaceTexture.getTransformMatrix(textureTransformMatrix);
|
||||
|
|
@ -418,7 +416,7 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
|
|||
externalCopyFrameProcessor.updateProgramAndDraw(presentationTimeNs);
|
||||
|
||||
for (int i = 0; i < frameProcessors.size() - 1; i++) {
|
||||
outputSize = inputSizes.get(i + 1);
|
||||
Size outputSize = inputSizes.get(i + 1);
|
||||
GlUtil.focusFramebuffer(
|
||||
eglDisplay,
|
||||
eglContext,
|
||||
|
|
|
|||
Loading…
Reference in a new issue