mirror of
https://github.com/samsonjs/media.git
synced 2026-04-16 13:05:46 +00:00
Fix incorrect re-use of non-secure DummySurface with secure decoder
Issue: #8776 PiperOrigin-RevId: 376186877
This commit is contained in:
parent
5cec2a761f
commit
10e96c99e5
2 changed files with 14 additions and 2 deletions
|
|
@ -11,6 +11,12 @@
|
|||
* Extractors:
|
||||
* Add support for MPEG-H 3D Audio in MP4 extractors
|
||||
([#8860](https://github.com/google/ExoPlayer/pull/8860)).
|
||||
* Video:
|
||||
* Fix bug that could cause `CodecException: Error 0xffffffff` to be thrown
|
||||
from `MediaCodec.native_setSurface` in use cases that involve both
|
||||
swapping the output `Surface` and a mixture of secure and non-secure
|
||||
content being played
|
||||
([#8776](https://github.com/google/ExoPlayer/issues/8776)).
|
||||
* HLS
|
||||
* Fix a bug where skipping into spliced-in chunks triggered an assertion
|
||||
error ([#8937](https://github.com/google/ExoPlayer/issues/8937).
|
||||
|
|
@ -21,7 +27,6 @@
|
|||
* Keep subtitle language features embedded (e.g. rubies & tate-chu-yoko)
|
||||
in `Cue.text` even when `SubtitleView#setApplyEmbeddedStyles()` is
|
||||
false.
|
||||
* UI
|
||||
* Fix `NullPointerException` in `StyledPlayerView` that could occur after
|
||||
calling `StyledPlayerView.setPlayer(null)`
|
||||
([#8985](https://github.com/google/ExoPlayer/issues/8985)).
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
|
|||
private boolean codecHandlesHdr10PlusOutOfBandMetadata;
|
||||
|
||||
@Nullable private Surface surface;
|
||||
@Nullable private Surface dummySurface;
|
||||
@Nullable private DummySurface dummySurface;
|
||||
private boolean haveReportedFirstFrameRenderedForCurrentSurface;
|
||||
@C.VideoScalingMode private int scalingMode;
|
||||
private boolean renderedFirstFrameAfterReset;
|
||||
|
|
@ -486,6 +486,7 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
|
|||
}
|
||||
}
|
||||
|
||||
@TargetApi(17) // Needed for dummySurface usage. dummySurface is always null on API level 16.
|
||||
@Override
|
||||
protected void onReset() {
|
||||
try {
|
||||
|
|
@ -596,12 +597,18 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
|
|||
return tunneling && Util.SDK_INT < 23;
|
||||
}
|
||||
|
||||
@TargetApi(17) // Needed for dummySurface usage. dummySurface is always null on API level 16.
|
||||
@Override
|
||||
protected MediaCodecAdapter.Configuration getMediaCodecConfiguration(
|
||||
MediaCodecInfo codecInfo,
|
||||
Format format,
|
||||
@Nullable MediaCrypto crypto,
|
||||
float codecOperatingRate) {
|
||||
if (dummySurface != null && dummySurface.secure != codecInfo.secure) {
|
||||
// We can't re-use the current DummySurface instance with the new decoder.
|
||||
dummySurface.release();
|
||||
dummySurface = null;
|
||||
}
|
||||
String codecMimeType = codecInfo.codecMimeType;
|
||||
codecMaxValues = getCodecMaxValues(codecInfo, format, getStreamFormats());
|
||||
MediaFormat mediaFormat =
|
||||
|
|
|
|||
Loading…
Reference in a new issue