mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-04 06:08:26 +02:00
avcodec/bsf_list: implement a AVBSFContext.flush callback
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
2d580d727c
commit
674b59c075
@ -350,6 +350,15 @@ static int bsf_list_filter(AVBSFContext *bsf, AVPacket *out)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void bsf_list_flush(AVBSFContext *bsf)
|
||||
{
|
||||
BSFListContext *lst = bsf->priv_data;
|
||||
|
||||
for (int 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 +407,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,
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user