Skip to content

Commit 5cd0cd2

Browse files
NicolasHugfacebook-github-bot
authored andcommitted
[fbsync] Ensure fps is integer before passing to av backend (#8991)
Summary: Co-authored-by: Nicolas Hug <[email protected]> Reviewed By: scotts Differential Revision: D77998630 fbshipit-source-id: aaf14319bba17681efab7c0c0001ec5471890205
1 parent 24c54fe commit 5cd0cd2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torchvision/io/video.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def write_video(
115115
# PyAV does not support floating point numbers with decimal point
116116
# and will throw OverflowException in case this is not the case
117117
if isinstance(fps, float):
118-
fps = np.round(fps)
118+
fps = int(np.round(fps))
119119

120120
with av.open(filename, mode="w") as container:
121121
stream = container.add_stream(video_codec, rate=fps)

0 commit comments

Comments
 (0)