mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 16:57:53 +00:00
Fix Canary camera stream blocking call (#71369)
* fix: Canary stream camera, fix blocker fixes a "detected blocking call to putrequest inside the event loop. This is causing stability issues. Please report issue for canary doing blocking calls at homeassistant/components/canary/camera.py, line 149: self._live_stream_session.live_stream_url, extra_cmd=self._ffmpeg_arguments" from log file. * refactor: black formatting changes tsia
This commit is contained in:
parent
6984c56cc6
commit
1a00bb9fc4
@ -144,10 +144,11 @@ class CanaryCamera(CoordinatorEntity[CanaryDataUpdateCoordinator], Camera):
|
||||
if self._live_stream_session is None:
|
||||
return None
|
||||
|
||||
stream = CameraMjpeg(self._ffmpeg.binary)
|
||||
await stream.open_camera(
|
||||
self._live_stream_session.live_stream_url, extra_cmd=self._ffmpeg_arguments
|
||||
live_stream_url = await self.hass.async_add_executor_job(
|
||||
getattr, self._live_stream_session, "live_stream_url"
|
||||
)
|
||||
stream = CameraMjpeg(self._ffmpeg.binary)
|
||||
await stream.open_camera(live_stream_url, extra_cmd=self._ffmpeg_arguments)
|
||||
|
||||
try:
|
||||
stream_reader = await stream.get_reader()
|
||||
|
Loading…
x
Reference in New Issue
Block a user