Used to reset the codec's private internal state.
Signed-off-by: James Almer <jamrial@gmail.com>
return 0;
}
+void ff_cbs_flush(CodedBitstreamContext *ctx)
+{
+ if (ctx->codec && ctx->codec->flush)
+ ctx->codec->flush(ctx);
+}
+
void ff_cbs_close(CodedBitstreamContext **ctx_ptr)
{
CodedBitstreamContext *ctx = *ctx_ptr;
int ff_cbs_init(CodedBitstreamContext **ctx,
enum AVCodecID codec_id, void *log_ctx);
+/**
+ * Reset all internal state in a context.
+ */
+void ff_cbs_flush(CodedBitstreamContext *ctx);
+
/**
* Close a context and free all internal state.
*/
int (*assemble_fragment)(CodedBitstreamContext *ctx,
CodedBitstreamFragment *frag);
+ // Reset the codec internal state.
+ void (*flush)(CodedBitstreamContext *ctx);
+
// Free the codec internal state.
void (*close)(CodedBitstreamContext *ctx);
} CodedBitstreamType;