[FFmpeg-devel] [PATCH] avcodec/bsf_list: implement a AVBSFContext.flush callback
James Almer
jamrial at gmail.com
Sun Jan 6 06:31:12 EET 2019
Signed-off-by: James Almer <jamrial at gmail.com>
---
libavcodec/bsf.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/libavcodec/bsf.c b/libavcodec/bsf.c
index 03841da682..41dde4dcc8 100644
--- a/libavcodec/bsf.c
+++ b/libavcodec/bsf.c
@@ -350,6 +350,16 @@ static int bsf_list_filter(AVBSFContext *bsf, AVPacket *out)
return ret;
}
+static void bsf_list_flush(AVBSFContext *bsf)
+{
+ BSFListContext *lst = bsf->priv_data;
+ int i;
+
+ for (i = 0; i < lst->nb_bsfs; ++i)
+ av_bsf_flush(lst->bsfs[i]);
+ lst->idx = lst->flushed_idx = 0;
+}
+
static void bsf_list_close(AVBSFContext *bsf)
{
BSFListContext *lst = bsf->priv_data;
@@ -398,6 +408,7 @@ const AVBitStreamFilter ff_list_bsf = {
.priv_class = &bsf_list_class,
.init = bsf_list_init,
.filter = bsf_list_filter,
+ .flush = bsf_list_flush,
.close = bsf_list_close,
};
--
2.20.1
More information about the ffmpeg-devel
mailing list