Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions tests/test_seek.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 3 additions & 1 deletion tests/test_videoframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading