summaryrefslogtreecommitdiff
path: root/libavcodec/codec_internal.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2023-01-25 16:39:01 +0100
committerAnton Khirnov <anton@khirnov.net>2023-01-29 09:14:13 +0100
commitd0c8ca961d7d4a496f212283781ba74623bf8c3f (patch)
tree226d47246979c08b55757bf3fd08c021aa362272 /libavcodec/codec_internal.h
parente5e29eda5aae8eb5d1d32f647c68c0543db63217 (diff)
lavc: add a private cap for fake-delay encoders
Some encoders (ffv1, flac, adx) are marked with AV_CODEC_CAP_DELAY onky in order to be flushed at the end, otherwise they behave as no-delay encoders. Add a capability to mark these encoders. Use it for setting pts generically.
Diffstat (limited to 'libavcodec/codec_internal.h')
-rw-r--r--libavcodec/codec_internal.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/codec_internal.h b/libavcodec/codec_internal.h
index e3b77e6dea..130a7dc3cd 100644
--- a/libavcodec/codec_internal.h
+++ b/libavcodec/codec_internal.h
@@ -80,6 +80,14 @@
* Codec supports embedded ICC profiles (AV_FRAME_DATA_ICC_PROFILE).
*/
#define FF_CODEC_CAP_ICC_PROFILES (1 << 9)
+/**
+ * The encoder has AV_CODEC_CAP_DELAY set, but does not actually have delay - it
+ * only wants to be flushed at the end to update some context variables (e.g.
+ * 2pass stats) or produce a trailing packet. Besides that it immediately
+ * produces exactly one output packet per each input frame, just as no-delay
+ * encoders do.
+ */
+#define FF_CODEC_CAP_EOF_FLUSH (1 << 10)
/**
* FFCodec.codec_tags termination value