aboutsummaryrefslogtreecommitdiffhomepage
path: root/video/decode/vaapi.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/decode/vaapi.c')
-rw-r--r--video/decode/vaapi.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/video/decode/vaapi.c b/video/decode/vaapi.c
index aeadeb488e..e657663bbb 100644
--- a/video/decode/vaapi.c
+++ b/video/decode/vaapi.c
@@ -55,6 +55,13 @@ static int init_decoder(struct lavc_ctx *ctx, int w, int h)
assert(!ctx->avctx->hw_frames_ctx);
+ // If we use direct rendering, disallow 10 bit - it's probably not
+ // implemented yet, and our downstream components can't deal with it.
+ if (!p->own_ctx && required_sw_format != AV_PIX_FMT_NV12) {
+ MP_WARN(ctx, "10 bit surfaces are currently supported.\n");
+ return -1;
+ }
+
if (p->frames_ref) {
AVHWFramesContext *fctx = (void *)p->frames_ref->data;
if (fctx->width != w || fctx->height != h ||