mirror of
https://github.com/samsonjs/media.git
synced 2026-03-26 09:35:47 +00:00
Fix not able to set a null output surface.
Previously, after calling MCVR.setOutput() with null, `frameProcessorManager`'s output surface is cleared. What was unexpected is `ExoPlayerInternal` notifies a zero output resolution after clearing the output surface. This zero resolution causes FrameProcessor to fail. PiperOrigin-RevId: 501861993
This commit is contained in:
parent
d16e84e296
commit
492dfeb0c7
1 changed files with 5 additions and 1 deletions
|
|
@ -686,7 +686,10 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
|
|||
break;
|
||||
case MSG_SET_VIDEO_OUTPUT_RESOLUTION:
|
||||
Size outputResolution = (Size) checkNotNull(message);
|
||||
if (displaySurface != null && frameProcessorManager.isEnabled()) {
|
||||
if (outputResolution.getWidth() != 0
|
||||
&& outputResolution.getHeight() != 0
|
||||
&& displaySurface != null
|
||||
&& frameProcessorManager.isEnabled()) {
|
||||
frameProcessorManager.setOutputSurfaceInfo(displaySurface, outputResolution);
|
||||
}
|
||||
break;
|
||||
|
|
@ -2051,6 +2054,7 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
|
|||
checkNotNull(frameProcessor).setOutputSurfaceInfo(null);
|
||||
currentSurfaceAndSize = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the input surface info.
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in a new issue