diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c index 8326690038..700b5f09a0 100644 --- a/libavcodec/hevcdec.c +++ b/libavcodec/hevcdec.c @@ -388,6 +388,9 @@ static enum AVPixelFormat get_format(HEVCContext *s, const HEVCSPS *sps) if (sps->pix_fmt == AV_PIX_FMT_YUV420P || sps->pix_fmt == AV_PIX_FMT_YUVJ420P || sps->pix_fmt == AV_PIX_FMT_YUV420P10) { +#if CONFIG_HEVC_D3D11VA_HWACCEL + *fmt++ = AV_PIX_FMT_D3D11VA_VLD; +#endif #if CONFIG_HEVC_DXVA2_HWACCEL *fmt++ = AV_PIX_FMT_DXVA2_VLD; #endif @@ -396,9 +399,6 @@ static enum AVPixelFormat get_format(HEVCContext *s, const HEVCSPS *sps) #endif } if (sps->pix_fmt == AV_PIX_FMT_YUV420P || sps->pix_fmt == AV_PIX_FMT_YUVJ420P) { -#if CONFIG_HEVC_D3D11VA_HWACCEL - *fmt++ = AV_PIX_FMT_D3D11VA_VLD; -#endif #if CONFIG_HEVC_VDPAU_HWACCEL *fmt++ = AV_PIX_FMT_VDPAU; #endif