File tree 1 file changed +4
-0
lines changed
1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ class VideoDecoder:
47
47
Use 1 for single-threaded decoding which may be best if you are running multiple
48
48
instances of ``VideoDecoder`` in parallel. Use a higher number for multi-threaded
49
49
decoding which is best if you are running a single instance of ``VideoDecoder``.
50
+ Passing 0 lets FFmpeg decide on the number of threads.
50
51
Default: 1.
51
52
device (str or torch.device, optional): The device to use for decoding. Default: "cpu".
52
53
@@ -88,6 +89,9 @@ def __init__(
88
89
f"Supported values are { ', ' .join (allowed_dimension_orders )} ."
89
90
)
90
91
92
+ if num_ffmpeg_threads is None :
93
+ raise ValueError (f"{ num_ffmpeg_threads = } should be an int." )
94
+
91
95
core .scan_all_streams_to_update_metadata (self ._decoder )
92
96
core .add_video_stream (
93
97
self ._decoder ,
You can’t perform that action at this time.
0 commit comments