Skip to content

Commit 06298f6

Browse files
lgeigerWyattBlue
authored andcommitted
Remove cython workaround from input container
1 parent eafc98f commit 06298f6

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

av/container/input.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,7 @@ def demux(self, *args, **kwargs):
151151
"""
152152
self._assert_open()
153153

154-
# For whatever reason, Cython does not like us directly passing kwargs
155-
# from one method to another. Without kwargs, it ends up passing a
156-
# NULL reference, which segfaults. So we force it to do something with it.
157-
# This is a bug in Cython; see https://github.com/cython/cython/issues/2166
158-
id(kwargs)
159-
160-
streams = self.streams.get(*args, **kwargs)
154+
streams: list[Stream] = self.streams.get(*args, **kwargs)
161155
include_stream: cython.pointer[cython.bint] = cython.cast(
162156
cython.pointer[cython.bint],
163157
malloc(self.ptr.nb_streams * cython.sizeof(bint)),
@@ -225,7 +219,6 @@ def decode(self, *args, **kwargs):
225219
226220
"""
227221
self._assert_open()
228-
id(kwargs) # Avoid Cython bug; see demux().
229222
for packet in self.demux(*args, **kwargs):
230223
for frame in packet.decode():
231224
yield frame

0 commit comments

Comments
 (0)