diff options
author | James Almer <jamrial@gmail.com> | 2020-09-24 17:57:42 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2020-09-29 21:38:27 -0300 |
commit | 515b6419ca51f036a2d6dd42841a4be07147f865 (patch) | |
tree | 49390097e4abd2135fdd1815caaf01063b758ba3 /libavcodec/cbs.c | |
parent | 23d075416544f55a605b1818a8491c818312a62d (diff) | |
download | ffmpeg-515b6419ca51f036a2d6dd42841a4be07147f865.tar.gz |
avcodec/cbs: add a flush callback to CodedBitstreamType
Used to reset the codec's private internal state.
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/cbs.c')
-rw-r--r-- | libavcodec/cbs.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/cbs.c b/libavcodec/cbs.c index 7c1aa005c2..c8c526ab12 100644 --- a/libavcodec/cbs.c +++ b/libavcodec/cbs.c @@ -112,6 +112,12 @@ int ff_cbs_init(CodedBitstreamContext **ctx_ptr, 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; |