Fix mypy type for timestamp validator (#53598)
This commit is contained in:
parent
85c1614204
commit
b3b5ee10b1
1 changed files with 1 additions and 2 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue