diff --git a/src/config.c b/src/config.c index 7fea711..5d38408 100644 --- a/src/config.c +++ b/src/config.c @@ -181,13 +181,13 @@ VAStatus RequestQueryConfigProfiles(VADriverContextP context, bool found; found = any_fd_supports_output_format(driver_data, V4L2_PIX_FMT_MPEG2_SLICE); - if (found && index < (V4L2_REQUEST_MAX_CONFIG_ATTRIBUTES - 2)) { + if (found && index < (V4L2_REQUEST_MAX_PROFILES - 2)) { profiles[index++] = VAProfileMPEG2Simple; profiles[index++] = VAProfileMPEG2Main; } found = any_fd_supports_output_format(driver_data, V4L2_PIX_FMT_H264_SLICE); - if (found && index < (V4L2_REQUEST_MAX_CONFIG_ATTRIBUTES - 5)) { + if (found && index < (V4L2_REQUEST_MAX_PROFILES - 5)) { profiles[index++] = VAProfileH264Main; profiles[index++] = VAProfileH264High; profiles[index++] = VAProfileH264ConstrainedBaseline; @@ -196,15 +196,15 @@ VAStatus RequestQueryConfigProfiles(VADriverContextP context, } found = any_fd_supports_output_format(driver_data, V4L2_PIX_FMT_HEVC_SLICE); - if (found && index < (V4L2_REQUEST_MAX_CONFIG_ATTRIBUTES - 1)) + if (found && index < (V4L2_REQUEST_MAX_PROFILES - 1)) profiles[index++] = VAProfileHEVCMain; found = any_fd_supports_output_format(driver_data, V4L2_PIX_FMT_VP8_FRAME); - if (found && index < (V4L2_REQUEST_MAX_CONFIG_ATTRIBUTES - 1)) + if (found && index < (V4L2_REQUEST_MAX_PROFILES - 1)) profiles[index++] = VAProfileVP8Version0_3; found = any_fd_supports_output_format(driver_data, V4L2_PIX_FMT_VP9_FRAME); - if (found && index < (V4L2_REQUEST_MAX_CONFIG_ATTRIBUTES - 1)) + if (found && index < (V4L2_REQUEST_MAX_PROFILES - 1)) profiles[index++] = VAProfileVP9Profile0; *profiles_count = index;