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:
parent
9980b11058
commit
753dbea83f
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user