[FFmpeg-devel] [PATCH 36/36] avcodec/vp9_superframe_bsf: Merge close and flush
Andreas Rheinhardt
andreas.rheinhardt at gmail.com
Sat May 30 19:05:41 EEST 2020
They are essentially identical now.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
---
libavcodec/vp9_superframe_bsf.c | 18 ++++--------------
1 file changed, 4 insertions(+), 14 deletions(-)
diff --git a/libavcodec/vp9_superframe_bsf.c b/libavcodec/vp9_superframe_bsf.c
index 6d6b2c57de..278f5a47a6 100644
--- a/libavcodec/vp9_superframe_bsf.c
+++ b/libavcodec/vp9_superframe_bsf.c
@@ -31,7 +31,7 @@ typedef struct VP9BSFContext {
int n_cache;
} VP9BSFContext;
-static void vp9_superframe_flush(AVBSFContext *ctx)
+static void vp9_superframe_close_flush(AVBSFContext *ctx)
{
VP9BSFContext *s = ctx->priv_data;
@@ -184,7 +184,7 @@ static int vp9_superframe_filter(AVBSFContext *ctx, AVPacket *pkt)
// build superframe
res = merge_superframe(s->cache, s->n_cache, pkt);
- vp9_superframe_flush(ctx);
+ vp9_superframe_close_flush(ctx);
done:
if (res < 0)
@@ -192,16 +192,6 @@ done:
return res;
}
-static void vp9_superframe_close(AVBSFContext *ctx)
-{
- VP9BSFContext *s = ctx->priv_data;
- int n;
-
- // free cached data
- for (n = 0; n < MAX_CACHE; n++)
- av_buffer_unref(&s->cache[n]);
-}
-
static const enum AVCodecID codec_ids[] = {
AV_CODEC_ID_VP9, AV_CODEC_ID_NONE,
};
@@ -210,7 +200,7 @@ const AVBitStreamFilter ff_vp9_superframe_bsf = {
.name = "vp9_superframe",
.priv_data_size = sizeof(VP9BSFContext),
.filter = vp9_superframe_filter,
- .flush = vp9_superframe_flush,
- .close = vp9_superframe_close,
+ .flush = vp9_superframe_close_flush,
+ .close = vp9_superframe_close_flush,
.codec_ids = codec_ids,
};
--
2.20.1
More information about the ffmpeg-devel
mailing list