summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-08-24 23:02:40 +0200
committerwm4 <wm4@nowhere>2015-08-24 23:02:40 +0200
commit1ec1b4186c87ee88a0bc953c1ea0c5a2bc0f387e (patch)
tree719170e0dd55645295fbea1c916b6b187203f8b7
parent2172c22ee344b9bef0d3bb3bde99615194291d23 (diff)
downloadmpv-1ec1b4186c87ee88a0bc953c1ea0c5a2bc0f387e.tar.bz2
mpv-1ec1b4186c87ee88a0bc953c1ea0c5a2bc0f387e.tar.xz
vd_lavc: bump number of allocated surfaces for hwdec with HEVC
-rw-r--r--video/decode/vd_lavc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c
index 62fd0cebb7..bc038255b7 100644
--- a/video/decode/vd_lavc.c
+++ b/video/decode/vd_lavc.c
@@ -218,7 +218,10 @@ bool hwdec_check_codec_support(const char *decoder,
int hwdec_get_max_refs(struct lavc_ctx *ctx)
{
- return ctx->avctx->codec_id == AV_CODEC_ID_H264 ? 16 : 2;
+ if (ctx->avctx->codec_id == AV_CODEC_ID_H264 ||
+ ctx->avctx->codec_id == AV_CODEC_ID_HEVC)
+ return 16;
+ return 2;
}
void hwdec_request_api(struct mp_hwdec_info *info, const char *api_name)