Skip to content

Commit 7250b2f

Browse files
hmaarrfkjlaine
authored andcommitted
Add the flag ENCODER_FLUSH
1 parent aad8b1b commit 7250b2f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

av/codec/codec.pyx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,10 @@ Capabilities = define_enum('Capabilities', 'av.codec', (
130130
"""This codec takes the reordered_opaque field from input AVFrames
131131
and returns it in the corresponding field in AVCodecContext after
132132
encoding."""),
133+
('ENCODER_FLUSH', 1 << 21, # lib.AV_CODEC_CAP_ENCODER_FLUSH # FFmpeg 4.3
134+
"""This encoder can be flushed using avcodec_flush_buffers(). If this
135+
flag is not set, the encoder must be closed and reopened to ensure that
136+
no frames remain pending."""),
133137
), is_flags=True)
134138

135139

@@ -328,6 +332,7 @@ cdef class Codec(object):
328332
hardware = capabilities.flag_property('HARDWARE')
329333
hybrid = capabilities.flag_property('HYBRID')
330334
encoder_reordered_opaque = capabilities.flag_property('ENCODER_REORDERED_OPAQUE')
335+
encoder_flush = capabilities.flag_property('ENCODER_FLUSH')
331336

332337

333338
cdef get_codec_names():

0 commit comments

Comments
 (0)