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
@ -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…
x
Reference in New Issue
Block a user