Commit 2f21a30e authored by Xiang, Haihao's avatar Xiang, Haihao

i965_drv_driver: fix assertion failure

parent 6310eeee
...@@ -70,6 +70,8 @@ i965_QueryConfigEntrypoints(VADriverContextP ctx, ...@@ -70,6 +70,8 @@ i965_QueryConfigEntrypoints(VADriverContextP ctx,
VAEntrypoint *entrypoint_list, /* out */ VAEntrypoint *entrypoint_list, /* out */
int *num_entrypoints) /* out */ int *num_entrypoints) /* out */
{ {
VAStatus vaStatus = VA_STATUS_SUCCESS;
switch (profile) { switch (profile) {
case VAProfileMPEG2Simple: case VAProfileMPEG2Simple:
case VAProfileMPEG2Main: case VAProfileMPEG2Main:
...@@ -78,7 +80,7 @@ i965_QueryConfigEntrypoints(VADriverContextP ctx, ...@@ -78,7 +80,7 @@ i965_QueryConfigEntrypoints(VADriverContextP ctx,
break; break;
default: default:
assert(0); vaStatus = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
*num_entrypoints = 0; *num_entrypoints = 0;
break; break;
} }
...@@ -86,7 +88,7 @@ i965_QueryConfigEntrypoints(VADriverContextP ctx, ...@@ -86,7 +88,7 @@ i965_QueryConfigEntrypoints(VADriverContextP ctx,
/* If the assert fails then I965_MAX_ENTRYPOINTS needs to be bigger */ /* If the assert fails then I965_MAX_ENTRYPOINTS needs to be bigger */
assert(*num_entrypoints <= I965_MAX_ENTRYPOINTS); assert(*num_entrypoints <= I965_MAX_ENTRYPOINTS);
return VA_STATUS_SUCCESS; return vaStatus;
} }
VAStatus VAStatus
...@@ -173,7 +175,6 @@ i965_CreateConfig(VADriverContextP ctx, ...@@ -173,7 +175,6 @@ i965_CreateConfig(VADriverContextP ctx,
break; break;
default: default:
assert(0);
vaStatus = VA_STATUS_ERROR_UNSUPPORTED_PROFILE; vaStatus = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment