File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,8 @@ def test_decode_half(self) -> None:
104104 frame_count = 0
105105
106106 for frame in container .decode (video_stream ):
107+ assert frame .pts is not None
108+
107109 if current_frame is None :
108110 current_frame = timestamp_to_frame (frame .pts , video_stream )
109111 else :
Original file line number Diff line number Diff line change @@ -32,7 +32,9 @@ def test_frame_duration_matches_packet() -> None:
3232 packet_durations .sort (key = lambda x : x [0 ])
3333
3434 with av .open (fate_suite ("h264/interlaced_crop.mp4" )) as container :
35- frame_durations = [(f .pts , f .duration ) for f in container .decode (video = 0 )]
35+ frame_durations = [
36+ (f .pts , f .duration ) for f in container .decode (video = 0 ) if f .pts is not None
37+ ]
3638 frame_durations .sort (key = lambda x : x [0 ])
3739
3840 assert len (packet_durations ) == len (frame_durations )
You can’t perform that action at this time.
0 commit comments