1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-09 00:17:07 +00:00

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.
This commit is contained in:
wm4 2017-01-26 11:37:47 +01:00
parent 9980b11058
commit 753dbea83f

View File

@ -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;
}