Retain decoder instance after the renderer is disabled

Issue: #2826

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=216852679
This commit is contained in:
olly 2018-10-12 06:21:39 -07:00 committed by Oliver Woodman
parent 842f622d29
commit ba6a118998

View file

@ -558,6 +558,16 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
@Override
protected void onDisabled() {
if (drmSession != null || pendingDrmSession != null) {
// TODO: Do something better with this case.
onReset();
} else {
flushOrReleaseCodec();
}
}
@Override
protected void onReset() {
format = null;
availableCodecInfos = null;
try {