Bump pyAV and close unclosed outputs (#35960)
* bump pyAV and close unclosed outputs * skip stream from coverage for now * fix divide by zero errorpull/36070/head
parent
f4f031e703
commit
9e1c35cfd7
|
@ -727,6 +727,7 @@ omit =
|
|||
homeassistant/components/steam_online/sensor.py
|
||||
homeassistant/components/stiebel_eltron/*
|
||||
homeassistant/components/stookalert/*
|
||||
homeassistant/components/stream/*
|
||||
homeassistant/components/streamlabswater/*
|
||||
homeassistant/components/suez_water/*
|
||||
homeassistant/components/supervisord/sensor.py
|
||||
|
|
|
@ -79,8 +79,11 @@ class StreamOutput:
|
|||
@property
|
||||
def target_duration(self) -> int:
|
||||
"""Return the average duration of the segments in seconds."""
|
||||
segment_length = len(self._segments)
|
||||
if not segment_length:
|
||||
return 0
|
||||
durations = [s.duration for s in self._segments]
|
||||
return round(sum(durations) // len(self._segments)) or 1
|
||||
return round(sum(durations) // segment_length) or 1
|
||||
|
||||
def get_segment(self, sequence: int = None) -> Any:
|
||||
"""Retrieve a specific segment, or the whole list."""
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"domain": "stream",
|
||||
"name": "Stream",
|
||||
"documentation": "https://www.home-assistant.io/integrations/stream",
|
||||
"requirements": ["av==7.0.1"],
|
||||
"requirements": ["av==8.0.1"],
|
||||
"dependencies": ["http"],
|
||||
"codeowners": ["@hunterjm"],
|
||||
"quality_scale": "internal"
|
||||
|
|
|
@ -164,3 +164,7 @@ def stream_worker(hass, stream, quit_event):
|
|||
# Assign the video packet to the new stream & mux
|
||||
packet.stream = buffer.vstream
|
||||
buffer.output.mux(packet)
|
||||
|
||||
# Close stream
|
||||
buffer.output.close()
|
||||
container.close()
|
||||
|
|
|
@ -291,7 +291,7 @@ atenpdu==0.3.0
|
|||
aurorapy==0.2.6
|
||||
|
||||
# homeassistant.components.stream
|
||||
av==7.0.1
|
||||
av==8.0.1
|
||||
|
||||
# homeassistant.components.avea
|
||||
avea==1.4
|
||||
|
|
|
@ -138,7 +138,7 @@ arcam-fmj==0.4.4
|
|||
async-upnp-client==0.14.13
|
||||
|
||||
# homeassistant.components.stream
|
||||
av==7.0.1
|
||||
av==8.0.1
|
||||
|
||||
# homeassistant.components.axis
|
||||
axis==25
|
||||
|
|
Loading…
Reference in New Issue