diff options
author | wm4 <wm4@nowhere> | 2017-01-26 11:37:47 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-01-26 11:37:47 +0100 |
commit | 753dbea83fb3df7197ade934b01ecd2d4a310c33 (patch) | |
tree | abd7999cb07ee9c627aa248320ecb1b793f3c6f7 /video | |
parent | 9980b1105887ce02b9765383df0ea420ac3fe8e2 (diff) | |
download | mpv-753dbea83fb3df7197ade934b01ecd2d4a310c33.tar.bz2 mpv-753dbea83fb3df7197ade934b01ecd2d4a310c33.tar.xz |
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.
Diffstat (limited to 'video')
-rw-r--r-- | video/decode/vd_lavc.c | 8 |
1 files changed, 6 insertions, 2 deletions
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; } |