mirror of
https://github.com/androidx/media.git
synced 2025-04-29 22:36:54 +08:00
MCVR.hasSurfaceForCodec considers VideoSink
This change keeps getSurfaceForCodec and hasSurfaceForCodec in sync. Before this change when ExoPlayer is configured with setVideoEffects and no display surface, codecs that need Set Output Surface Workaround would not be initialized because hasSurfaceForCodec always returns false PiperOrigin-RevId: 692900899
This commit is contained in:
parent
aebda58314
commit
bd90ef38b0
@ -1815,7 +1815,8 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer
|
||||
}
|
||||
|
||||
private boolean hasSurfaceForCodec(MediaCodecInfo codecInfo) {
|
||||
return (displaySurface != null && displaySurface.isValid())
|
||||
return videoSink != null
|
||||
|| (displaySurface != null && displaySurface.isValid())
|
||||
|| shouldUseDetachedSurface(codecInfo)
|
||||
|| shouldUsePlaceholderSurface(codecInfo);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user