File tree Expand file tree Collapse file tree 2 files changed +3
-10
lines changed
Expand file tree Collapse file tree 2 files changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,8 @@ namespace facebook::torchcodec {
1717
1818// Enables uers to pass in a Python file-like object. We then forward all read
1919// and seek calls back up to the methods on the Python object.
20- class AVIOFileLikeContext : public AVIOContextHolder {
20+ class __attribute__ ((visibility(" default" ))) AVIOFileLikeContext
21+ : public AVIOContextHolder {
2122 public:
2223 explicit AVIOFileLikeContext (py::object fileLike);
2324
Original file line number Diff line number Diff line change @@ -66,6 +66,7 @@ function(make_torchcodec_libraries
6666 set (decoder_sources
6767 AVIOContextHolder.cpp
6868 AVIOTensorContext.cpp
69+ AVIOFileLikeContext.cpp
6970 FFMPEGCommon.cpp
7071 Frame.cpp
7172 DeviceInterface.cpp
@@ -142,15 +143,6 @@ function(make_torchcodec_libraries
142143 "${pybind_ops_sources} "
143144 "${pybind_ops_dependencies} "
144145 )
145- # pybind11 limits the visibility of symbols in the shared library to prevent
146- # stray initialization of py::objects. The rest of the object code must
147- # match. See:
148- # https://pybind11.readthedocs.io/en/stable/faq.html#someclass-declared-with-greater-visibility-than-the-type-of-its-field-someclass-member-wattributes
149- target_compile_options (
150- ${pybind_ops_library_name}
151- PUBLIC
152- "-fvisibility=hidden"
153- )
154146 # If we don't make sure this flag is set, we run into segfauls at import
155147 # time on Mac. See:
156148 # https://github.com/pybind/pybind11/issues/3907#issuecomment-1170412764
You can’t perform that action at this time.
0 commit comments