Don't clear the exception in SimpleDecoder.flush()
Clearing the exception puts the SimpleDecoder into a silent failure state - the decoder thread is dead (because decode() has returned false) but it's still possible to queue buffers to the decoder (they just never get decoded). This partially reverts https://github.com/google/ExoPlayer/commit/4107375c9d21136090d0071b04a498024eec6a4c Also always recreate the decoder when handling an error in TextRenderer This ensures we can try and decode a later subtitle sample after encountering a decode error. This behaviour is what nulling out the exception in SimpleDecoder.flush() was trying to achieve. We need to ensure we don't start passing data to the new decoder until we've hit the next key frame, so we throw away any non-keyframe samples inside TextRenderer#render(). Issue: #7590 PiperOrigin-RevId: 319785908
Showing
with
27 additions
and
16 deletions
Please
register
or
sign in
to comment