Commit 3a23383b by kimvde Committed by Andrew Lewis

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
parent cfbdc7ba
......@@ -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() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment