Fixes: b4651890be4 ("frontends/va: Update conditional checks for code stability.")
Signed-off-by: Thong Thai <thong.thai@amd.com>
Tested-by: James Zhu <James.Zhu@amd.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4285
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9020>
}
}
if (attrib_list[i].type == VAConfigAttribEncPackedHeaders) {
- if (attrib_list[i].value != 0) {
+ if (attrib_list[i].value > 1 ||
+ config->entrypoint != PIPE_VIDEO_ENTRYPOINT_ENCODE) {
FREE(config);
return VA_STATUS_ERROR_INVALID_VALUE;
}