@@ -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,
};
They are essentially identical now. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> --- libavcodec/vp9_superframe_bsf.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-)