mirror of
https://github.com/samsonjs/media.git
synced 2026-04-08 11:45:51 +00:00
Fix NPE in Transformer.getProgress()
If muxerWrapper.release() was throwing an exception, the progress state was not updated and getProgress could throw an exception. #minor-release PiperOrigin-RevId: 424696783
This commit is contained in:
parent
cfbdc7ba5b
commit
3a23383bc3
1 changed files with 1 additions and 1 deletions
|
|
@ -776,6 +776,7 @@ public final class Transformer {
|
|||
*/
|
||||
private void releaseResources(boolean forCancellation) throws TransformationException {
|
||||
verifyApplicationThread();
|
||||
progressState = PROGRESS_STATE_NO_TRANSFORMATION;
|
||||
if (player != null) {
|
||||
player.release();
|
||||
player = null;
|
||||
|
|
@ -789,7 +790,6 @@ public final class Transformer {
|
|||
}
|
||||
muxerWrapper = null;
|
||||
}
|
||||
progressState = PROGRESS_STATE_NO_TRANSFORMATION;
|
||||
}
|
||||
|
||||
private void verifyApplicationThread() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue