diff mbox series

[FFmpeg-devel,2/6] avcodec/bsf: add a capabilities field to AVBitStreamFilter

Message ID 20220214224156.39862-2-jamrial@gmail.com
State New
Headers show
Series [FFmpeg-devel,1/6] ffmpeg: flush delayed frames in codec copy scenarios | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

James Almer Feb. 14, 2022, 10:41 p.m. UTC
And a first flag to signal that the bsf buffers packets and needs to
be drained

Signed-off-by: James Almer <jamrial@gmail.com>
---
Missing APIChanges entry and version bump.

 libavcodec/bsf.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)
diff mbox series

Patch

diff --git a/libavcodec/bsf.h b/libavcodec/bsf.h
index 8c5355d186..798c6470ee 100644
--- a/libavcodec/bsf.h
+++ b/libavcodec/bsf.h
@@ -87,6 +87,12 @@  typedef struct AVBSFContext {
     AVRational time_base_out;
 } AVBSFContext;
 
+/**
+ * The bitstream filter requires flushing with NULL input at the end in order
+ * to drain all buffered packets and give the complete and correct output.
+ */
+#define AV_BSF_CAP_DELAY               (1 <<  0)
+
 typedef struct AVBitStreamFilter {
     const char *name;
 
@@ -108,6 +114,12 @@  typedef struct AVBitStreamFilter {
      */
     const AVClass *priv_class;
 
+    /**
+     * Filter capabilities.
+     * see AV_BSF_CAP_*
+     */
+    int capabilities;
+
     /*****************************************************************
      * No fields below this line are part of the public API. They
      * may not be used outside of libavcodec and can be changed and