hardware/intel/libva
修订版 | 2f21a30e2734ce0209b394c764fbd2f9d4b76130 (tree) |
---|---|
时间 | 2009-08-05 12:49:33 |
作者 | Xiang, Haihao <haihao.xiang@inte...> |
Commiter | Xiang, Haihao |
i965_drv_driver: fix assertion failure
@@ -70,6 +70,8 @@ i965_QueryConfigEntrypoints(VADriverContextP ctx, | ||
70 | 70 | VAEntrypoint *entrypoint_list, /* out */ |
71 | 71 | int *num_entrypoints) /* out */ |
72 | 72 | { |
73 | + VAStatus vaStatus = VA_STATUS_SUCCESS; | |
74 | + | |
73 | 75 | switch (profile) { |
74 | 76 | case VAProfileMPEG2Simple: |
75 | 77 | case VAProfileMPEG2Main: |
@@ -78,7 +80,7 @@ i965_QueryConfigEntrypoints(VADriverContextP ctx, | ||
78 | 80 | break; |
79 | 81 | |
80 | 82 | default: |
81 | - assert(0); | |
83 | + vaStatus = VA_STATUS_ERROR_UNSUPPORTED_PROFILE; | |
82 | 84 | *num_entrypoints = 0; |
83 | 85 | break; |
84 | 86 | } |
@@ -86,7 +88,7 @@ i965_QueryConfigEntrypoints(VADriverContextP ctx, | ||
86 | 88 | /* If the assert fails then I965_MAX_ENTRYPOINTS needs to be bigger */ |
87 | 89 | assert(*num_entrypoints <= I965_MAX_ENTRYPOINTS); |
88 | 90 | |
89 | - return VA_STATUS_SUCCESS; | |
91 | + return vaStatus; | |
90 | 92 | } |
91 | 93 | |
92 | 94 | VAStatus |
@@ -173,7 +175,6 @@ i965_CreateConfig(VADriverContextP ctx, | ||
173 | 175 | break; |
174 | 176 | |
175 | 177 | default: |
176 | - assert(0); | |
177 | 178 | vaStatus = VA_STATUS_ERROR_UNSUPPORTED_PROFILE; |
178 | 179 | break; |
179 | 180 | } |