Skip to content

Commit 715db20

Browse files
committed
set crf as optional
1 parent 09e51b2 commit 715db20

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/torchcodec/encoders/_video_encoder.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from pathlib import Path
2-
from typing import Union
2+
from typing import Optional, Union
33

44
import torch
55
from torch import Tensor
@@ -36,7 +36,7 @@ def to_file(
3636
self,
3737
dest: Union[str, Path],
3838
*,
39-
crf: int = None,
39+
crf: Optional[int] = None,
4040
) -> None:
4141
"""Encode frames into a file.
4242
@@ -59,7 +59,7 @@ def to_tensor(
5959
self,
6060
format: str,
6161
*,
62-
crf: int = None,
62+
crf: Optional[int] = None,
6363
) -> Tensor:
6464
"""Encode frames into raw bytes, as a 1D uint8 Tensor.
6565
@@ -85,7 +85,7 @@ def to_file_like(
8585
file_like,
8686
format: str,
8787
*,
88-
crf: int = None,
88+
crf: Optional[int] = None,
8989
) -> None:
9090
"""Encode frames into a file-like object.
9191

0 commit comments

Comments
 (0)