[FFmpeg-devel] [PATCH] libavcodec/dxva2.c: fix dxva2 does not support H264 baseline profile
xyz1001
zgzf1001 at gmail.com
Sat Oct 14 06:59:52 EEST 2023
dxva2 fail to init when decode h264 with baseline profile becase `prof_h264_high` does not contains `AV_PROFILE_H264_BASELINE` and `dxva_check_codec_compatibility` will return error
---
libavcodec/dxva2.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavcodec/dxva2.c b/libavcodec/dxva2.c
index d7bc587562..e6b83f89cc 100644
--- a/libavcodec/dxva2.c
+++ b/libavcodec/dxva2.c
@@ -61,7 +61,8 @@ typedef struct dxva_mode {
static const int prof_mpeg2_main[] = {AV_PROFILE_MPEG2_SIMPLE,
AV_PROFILE_MPEG2_MAIN,
AV_PROFILE_UNKNOWN};
-static const int prof_h264_high[] = {AV_PROFILE_H264_CONSTRAINED_BASELINE,
+static const int prof_h264_high[] = {AV_PROFILE_H264_BASELINE,
+ AV_PROFILE_H264_CONSTRAINED_BASELINE,
AV_PROFILE_H264_MAIN,
AV_PROFILE_H264_HIGH,
AV_PROFILE_UNKNOWN};
--
2.42.0
More information about the ffmpeg-devel
mailing list