File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed
Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ from av.dictionary import Dictionary
1313
1414
1515cdef close_input(InputContainer self ):
16+ self .streams = StreamContainer()
1617 if self .input_was_opened:
1718 with nogil:
1819 # This causes `self.ptr` to be set to NULL.
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ log = logging.getLogger(__name__)
1818
1919
2020cdef close_output(OutputContainer self ):
21+ self .streams = StreamContainer()
2122 if self ._started and not self ._done:
2223 # We must only ever call av_write_trailer *once*, otherwise we get a
2324 # segmentation fault. Therefore no matter whether it succeeds or not
@@ -245,9 +246,6 @@ cdef class OutputContainer(Container):
245246 return lib.avcodec_get_name(self .format.optr.subtitle_codec)
246247
247248 def close (self ):
248- for stream in self .streams:
249- del stream
250-
251249 close_output(self )
252250
253251 def mux (self , packets ):
You can’t perform that action at this time.
0 commit comments