Skip to content

Commit

Permalink
fix pyav incompatible
Browse files Browse the repository at this point in the history
  • Loading branch information
leng-yue committed May 3, 2022
1 parent 6c239f3 commit 4ae9b2d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "scrcpy-client"
version = "0.4.2"
version = "0.4.3"
description = "A client of scrcpy"
authors = ["lengyue <[email protected]>"]
readme = "README.md"
Expand Down
3 changes: 2 additions & 1 deletion scrcpy/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import numpy as np
from adbutils import AdbDevice, AdbError, Network, _AdbStreamConnection, adb
from av.codec import CodecContext
from av.error import InvalidDataError

from .const import EVENT_FRAME, EVENT_INIT, LOCK_SCREEN_ORIENTATION_UNLOCKED
from .control import ControlSender
Expand Down Expand Up @@ -190,7 +191,7 @@ def __stream_loop(self) -> None:
self.last_frame = frame
self.resolution = (frame.shape[1], frame.shape[0])
self.__send_to_listeners(EVENT_FRAME, frame)
except BlockingIOError:
except (BlockingIOError, InvalidDataError):
time.sleep(0.01)
if not self.block_frame:
self.__send_to_listeners(EVENT_FRAME, None)
Expand Down

0 comments on commit 4ae9b2d

Please sign in to comment.