From 753dbea83fb3df7197ade934b01ecd2d4a310c33 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 26 Jan 2017 11:37:47 +0100 Subject: vd_lavc: allocate 8 ref frames for VP9 Apparently this is the maximum that can be preserved. There is also something about the decoder being able only to use 3 frames at a time, and I'm assuming these are part of the 8 frames. --- video/decode/vd_lavc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'video/decode') diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c index 7e3c36ecfc..54d827896f 100644 --- a/video/decode/vd_lavc.c +++ b/video/decode/vd_lavc.c @@ -276,9 +276,13 @@ bool hwdec_check_codec_support(const char *codec, int hwdec_get_max_refs(struct lavc_ctx *ctx) { - if (ctx->avctx->codec_id == AV_CODEC_ID_H264 || - ctx->avctx->codec_id == AV_CODEC_ID_HEVC) + switch (ctx->avctx->codec_id) { + case AV_CODEC_ID_H264: + case AV_CODEC_ID_HEVC: return 16; + case AV_CODEC_ID_VP9: + return 8; + } return 2; } -- cgit v1.2.3