mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-07-29 12:18:39 +00:00
fix:Do not call codec.stop() on exception
This commit is contained in:
parent
2801a26737
commit
fd86b98a32
1 changed files with 2 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue