fix:Do not call codec.stop() on exception

dev
Barry 7 years ago
parent a925de05fa
commit 66c2e45ea9

@ -71,8 +71,9 @@ public class ScreenEncoder implements Device.RotationListener {
codec.start();
try {
alive = encode(codec, fd);
} finally {
// do not call stop() on exception, it would trigger an IllegalStateException
codec.stop();
} finally {
destroyDisplay(display);
codec.release();
surface.release();

Loading…
Cancel
Save