mirror of https://github.com/mpv-player/mpv
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:
parent
6c65537c90
commit
f5c4f0b0f4
|
@ -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]);
|
||||
|
|
Loading…
Reference in New Issue