From: Zhao Yakui <[email protected]> Currently when the hexicmal value is assigned to VA_INTEL_DEBUG env variable, it can't be recognized.
Signed-off-by: Zhao Yakui <[email protected]> --- src/intel_driver.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/intel_driver.c b/src/intel_driver.c index 994e64c..9e93efb 100644 --- a/src/intel_driver.c +++ b/src/intel_driver.c @@ -79,8 +79,15 @@ intel_driver_init(VADriverContextP ctx) char *env_str = NULL; g_intel_debug_option_flags = 0; - if ((env_str = getenv("VA_INTEL_DEBUG"))) - g_intel_debug_option_flags = atoi(env_str); + if ((env_str = getenv("VA_INTEL_DEBUG"))) { + char *debug_ptr = NULL; + debug_ptr = strstr(env_str, "0x"); + if (debug_ptr) { + g_intel_debug_option_flags = strtoul(debug_ptr, NULL, 16); + } else { + g_intel_debug_option_flags = atoi(env_str); + } + } if (g_intel_debug_option_flags) fprintf(stderr, "g_intel_debug_option_flags:%x\n", g_intel_debug_option_flags); -- 1.7.10.1 _______________________________________________ Libva mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libva
