File tree 1 file changed +3
-11
lines changed
1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -51,23 +51,15 @@ cdef class OutputContainer(Container):
51
51
Supports video, audio, and subtitle streams.
52
52
53
53
:param codec_name: The name of a codec.
54
- :type codec_name: str | Codec
54
+ :type codec_name: str
55
55
:param dict options: Stream options.
56
56
:param \\ **kwargs: Set attributes for the stream.
57
57
:rtype: The new :class:`~av.stream.Stream`.
58
58
59
59
"""
60
60
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
71
63
72
64
# Assert that this format supports the requested codec.
73
65
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