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:
104
104
frame_count = 0
105
105
106
106
for frame in container .decode (video_stream ):
107
+ assert frame .pts is not None
108
+
107
109
if current_frame is None :
108
110
current_frame = timestamp_to_frame (frame .pts , video_stream )
109
111
else :
Original file line number Diff line number Diff line change @@ -32,7 +32,9 @@ def test_frame_duration_matches_packet() -> None:
32
32
packet_durations .sort (key = lambda x : x [0 ])
33
33
34
34
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
+ ]
36
38
frame_durations .sort (key = lambda x : x [0 ])
37
39
38
40
assert len (packet_durations ) == len (frame_durations )
You can’t perform that action at this time.
0 commit comments