Skip to content

Commit 68b9de6

Browse files
author
Daniel Flores
committed
validate int64 to int
1 parent b96bd56 commit 68b9de6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/torchcodec/_core/custom_ops.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,12 @@ void encode_video_to_file(
404404
int64_t frame_rate,
405405
std::string_view file_name) {
406406
VideoStreamOptions videoStreamOptions;
407-
VideoEncoder(frames, frame_rate, file_name, videoStreamOptions).encode();
407+
VideoEncoder(
408+
frames,
409+
validateInt64ToInt(frame_rate, "frame_rate"),
410+
file_name,
411+
videoStreamOptions)
412+
.encode();
408413
}
409414

410415
void encode_audio_to_file(

0 commit comments

Comments
 (0)