From b3b5ee10b1400094a4fa6ef132cc18152283b601 Mon Sep 17 00:00:00 2001 From: Allen Porter Date: Tue, 27 Jul 2021 22:04:59 -0700 Subject: [PATCH] Fix mypy type for timestamp validator (#53598) --- homeassistant/components/stream/worker.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/homeassistant/components/stream/worker.py b/homeassistant/components/stream/worker.py index 1a0a7da5c39..72625fa0f5a 100644 --- a/homeassistant/components/stream/worker.py +++ b/homeassistant/components/stream/worker.py @@ -117,7 +117,6 @@ class SegmentBuffer: # Check for end of segment if packet.stream == self._input_video_stream: - if ( packet.is_keyframe and (packet.dts - self._segment_start_dts) * packet.time_base @@ -253,7 +252,7 @@ class TimestampValidator: # Number of consecutive missing decompression timestamps self._missing_dts = 0 - def is_valid(self, packet: av.Packet) -> float: + def is_valid(self, packet: av.Packet) -> bool: """Validate the packet timestamp based on ordering within the stream.""" # Discard packets missing DTS. Terminate if too many are missing. if packet.dts is None: