diff options
author | James Almer <jamrial@gmail.com> | 2020-09-25 00:04:15 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2020-09-29 21:38:27 -0300 |
commit | 421906dddb631420fe82c6248f14100bae19b8b8 (patch) | |
tree | 87658b491817d53380cc9bcf75a101112a5a2d37 | |
parent | 0c842533532aae9864db5527f6c321ff450f11a0 (diff) | |
download | ffmpeg-421906dddb631420fe82c6248f14100bae19b8b8.tar.gz |
avcodec/cbs_vp9: implement a CodedBitstreamType.flush() callback
Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r-- | libavcodec/cbs_vp9.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libavcodec/cbs_vp9.c b/libavcodec/cbs_vp9.c index 6a480b4ce3..e0b8c02ac2 100644 --- a/libavcodec/cbs_vp9.c +++ b/libavcodec/cbs_vp9.c @@ -634,6 +634,13 @@ static int cbs_vp9_assemble_fragment(CodedBitstreamContext *ctx, return 0; } +static void cbs_vp9_flush(CodedBitstreamContext *ctx) +{ + CodedBitstreamVP9Context *vp9 = ctx->priv_data; + + memset(vp9->ref, 0, sizeof(vp9->ref)); +} + static const CodedBitstreamUnitTypeDescriptor cbs_vp9_unit_types[] = { CBS_UNIT_TYPE_INTERNAL_REF(0, VP9RawFrame, data), CBS_UNIT_TYPE_END_OF_LIST @@ -649,5 +656,8 @@ const CodedBitstreamType ff_cbs_type_vp9 = { .split_fragment = &cbs_vp9_split_fragment, .read_unit = &cbs_vp9_read_unit, .write_unit = &cbs_vp9_write_unit, + + .flush = &cbs_vp9_flush, + .assemble_fragment = &cbs_vp9_assemble_fragment, }; |