There was an error while loading. Please reload this page.
2 parents df3d7d8 + 615e833 commit 68c560eCopy full SHA for 68c560e
1 file changed
pims/pyav_reader.py
@@ -59,7 +59,7 @@ def _gen_frames(demuxer, time_base, frame_rate=1., first_pts=0):
59
"Unable to read video: frames contain no timestamps. "
60
"Please use PyAVReaderIndexed.")
61
t = (timestamp - first_pts) * time_base
62
- i = int(t * frame_rate)
+ i = int(round(t * frame_rate))
63
yield WrapPyAvFrame(frame, frame_no=i,
64
metadata=dict(timestamp=timestamp, t=float(t)))
65
0 commit comments