Meant to reset the internal bsf state without the need to reinitialize it.
Signed-off-by: James Almer <jamrial@gmail.com>
API changes, most recent first:
+2018-08-16 - xxxxxxxxxx - lavc 58.23.100 - avcodec.h
+ Add av_bsf_flush().
+
2018-05-xx - xxxxxxxxxx - lavf 58.15.100 - avformat.h
Add pmt_version field to AVProgram
int (*init)(AVBSFContext *ctx);
int (*filter)(AVBSFContext *ctx, AVPacket *pkt);
void (*close)(AVBSFContext *ctx);
+ void (*flush)(AVBSFContext *ctx);
} AVBitStreamFilter;
#if FF_API_OLD_BSF
*/
int av_bsf_receive_packet(AVBSFContext *ctx, AVPacket *pkt);
+/**
+ * Reset the internal bitstream filter state / flush internal buffers.
+ */
+void av_bsf_flush(AVBSFContext *ctx);
+
/**
* Free a bitstream filter context and everything associated with it; write NULL
* into the supplied pointer.
return 0;
}
+void av_bsf_flush(AVBSFContext *ctx)
+{
+ ctx->internal->eof = 0;
+
+ av_packet_unref(ctx->internal->buffer_pkt);
+
+ if (ctx->filter->flush)
+ ctx->filter->flush(ctx);
+}
+
int av_bsf_send_packet(AVBSFContext *ctx, AVPacket *pkt)
{
int ret;
#include "libavutil/version.h"
#define LIBAVCODEC_VERSION_MAJOR 58
-#define LIBAVCODEC_VERSION_MINOR 22
-#define LIBAVCODEC_VERSION_MICRO 101
+#define LIBAVCODEC_VERSION_MINOR 23
+#define LIBAVCODEC_VERSION_MICRO 100
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \