summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Langdale <philipl@overt.org>2024-02-10 13:28:24 -0800
committerPhilip Langdale <philipl@overt.org>2024-02-10 13:29:04 -0800
commitf5c4f0b0f426d1ad03971dc8ff79167eab3987fc (patch)
treea2c5c783e4aadbd71e82d11e50582154c8f57031
parent6c65537c905bef8850c275fa3789b2e19bd7a506 (diff)
downloadmpv-f5c4f0b0f426d1ad03971dc8ff79167eab3987fc.tar.bz2
mpv-f5c4f0b0f426d1ad03971dc8ff79167eab3987fc.tar.xz
hwdec_drmprime: check for AV_PIX_FMT_P210 before using it
This isn't present in older ffmpeg releases. Fixes #13454
-rw-r--r--video/out/hwdec/hwdec_drmprime.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/video/out/hwdec/hwdec_drmprime.c b/video/out/hwdec/hwdec_drmprime.c
index d709e05c9d..55bd55e505 100644
--- a/video/out/hwdec/hwdec_drmprime.c
+++ b/video/out/hwdec/hwdec_drmprime.c
@@ -133,7 +133,9 @@ static int init(struct ra_hwdec *hw)
MP_TARRAY_APPEND(p, p->formats, num_formats, IMGFMT_420P);
MP_TARRAY_APPEND(p, p->formats, num_formats, pixfmt2imgfmt(AV_PIX_FMT_NV16));
MP_TARRAY_APPEND(p, p->formats, num_formats, IMGFMT_P010);
+#ifdef AV_PIX_FMT_P210
MP_TARRAY_APPEND(p, p->formats, num_formats, pixfmt2imgfmt(AV_PIX_FMT_P210));
+#endif
for (int i = 0; i < MP_ARRAY_SIZE(forked_pix_fmt_names); i++) {
enum AVPixelFormat fmt = av_get_pix_fmt(forked_pix_fmt_names[i]);