Skip to content

Commit 001f091

Browse files
authored
Fix typing error (#783)
1 parent b5995d6 commit 001f091

File tree

2 files changed

+12
-15
lines changed

2 files changed

+12
-15
lines changed

src/torchcodec/_core/ops.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,10 @@
2323

2424

2525
def load_torchcodec_shared_libraries():
26-
# Successively try to load libtorchcodec_*7.so, libtorchcodec_*6.so,
27-
# libtorchcodec_*5.so, and libtorchcodec_*4.so. Each of these correspond to an
28-
# ffmpeg major version. This should cover all potential ffmpeg versions
29-
# installed on the user's machine.
30-
#
31-
# On fbcode, _get_extension_path() is overridden and directly points to the
32-
# correct .so file, so this for-loop succeeds on the first iteration.
26+
# Successively try to load the shared libraries for each version of FFmpeg
27+
# that we support. We always start with the highest version, working our way
28+
# down to the lowest version. Once we can load ALL shared libraries for a
29+
# version of FFmpeg, we have succeeded and we stop.
3330
#
3431
# Note that we use two different methods for loading shared libraries:
3532
#

src/torchcodec/_internally_replaced_utils.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@ def _load_pybind11_module(module_name: str, library_path: str) -> ModuleType:
5353
return importlib.util.module_from_spec(spec)
5454

5555

56-
def _get_pybind_ops_module_name(ffmpeg_major_version: str) -> str:
57-
# Note that this value must match the value used as PYBIND_OPS_MODULE_NAME
58-
# when we compile _core/pybind_ops.cpp. If the values do not match, we will
59-
# not be able to import the C++ shared library as a Python module at
60-
# runtime.
61-
#
62-
# The parameter ffmpeg_major_version is unused externally, but used
63-
# internally.
56+
# Note that the return value from this function must match the value used as
57+
# PYBIND_OPS_MODULE_NAME when we compile _core/pybind_ops.cpp. If the values
58+
# do not match, we will not be able to import the C++ shared library as a
59+
# Python module at runtime.
60+
#
61+
# The parameter ffmpeg_major_version is unused externally, but used
62+
# internally.
63+
def _get_pybind_ops_module_name(ffmpeg_major_version: int) -> str:
6464
return "core_pybind_ops"

0 commit comments

Comments
 (0)