File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -51,23 +51,15 @@ cdef class OutputContainer(Container):
5151 Supports video, audio, and subtitle streams.
5252
5353 :param codec_name: The name of a codec.
54- :type codec_name: str | Codec
54+ :type codec_name: str
5555 :param dict options: Stream options.
5656 :param \\ **kwargs: Set attributes for the stream.
5757 :rtype: The new :class:`~av.stream.Stream`.
5858
5959 """
6060
61- cdef const lib.AVCodec * codec
62- cdef Codec codec_obj
63-
64- if isinstance (codec_name, Codec):
65- if codec_name.mode != " w" :
66- raise ValueError (" codec_name must be an encoder." )
67- codec_obj = codec_name
68- else :
69- codec_obj = Codec(codec_name, " w" )
70- codec = codec_obj.ptr
61+ cdef Codec codec_obj = Codec(codec_name, " w" )
62+ cdef const lib.AVCodec * codec = codec_obj.ptr
7163
7264 # Assert that this format supports the requested codec.
7365 if not lib.avformat_query_codec(self .ptr.oformat, codec.id, lib.FF_COMPLIANCE_NORMAL):
You can’t perform that action at this time.
0 commit comments