diff --git a/tests/test_seek.py b/tests/test_seek.py index d0e9e1f2e..ac28f6580 100644 --- a/tests/test_seek.py +++ b/tests/test_seek.py @@ -104,6 +104,8 @@ def test_decode_half(self) -> None: frame_count = 0 for frame in container.decode(video_stream): + assert frame.pts is not None + if current_frame is None: current_frame = timestamp_to_frame(frame.pts, video_stream) else: diff --git a/tests/test_videoframe.py b/tests/test_videoframe.py index 90d91ab45..a977cd828 100644 --- a/tests/test_videoframe.py +++ b/tests/test_videoframe.py @@ -32,7 +32,9 @@ def test_frame_duration_matches_packet() -> None: packet_durations.sort(key=lambda x: x[0]) with av.open(fate_suite("h264/interlaced_crop.mp4")) as container: - frame_durations = [(f.pts, f.duration) for f in container.decode(video=0)] + frame_durations = [ + (f.pts, f.duration) for f in container.decode(video=0) if f.pts is not None + ] frame_durations.sort(key=lambda x: x[0]) assert len(packet_durations) == len(frame_durations)