hwdec_drmprime: check for AV_PIX_FMT_P210 before using it

This isn't present in older ffmpeg releases.

Fixes #13454
This commit is contained in:
Philip Langdale 2024-02-10 13:28:24 -08:00
parent 6c65537c90
commit f5c4f0b0f4
1 changed files with 2 additions and 0 deletions

View File

@ -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]);