fclose(fp);
/* no setting in config file, use env setting */
- if (getenv(env)) {
+ value = getenv(env);
+ if (value) {
if (env_value)
- strncpy(env_value, getenv(env), 1024);
-
+ strncpy(env_value, value, 1024);
return 0;
}
char *driver_path = (char *) malloc( strlen(driver_dir) +
strlen(driver_name) +
strlen(DRIVER_EXTENSION) + 2 );
+ if (!driver_path) {
+ va_errorMessage("%s L%d Out of memory!n",
+ __FUNCTION__, __LINE__);
+ return VA_STATUS_ERROR_ALLOCATION_FAILED;
+ }
+
strncpy( driver_path, driver_dir, strlen(driver_dir) + 1);
strncat( driver_path, "/", strlen("/") );
strncat( driver_path, driver_name, strlen(driver_name) );
vaStatus = ctx->vtable->vaCreateConfig ( ctx, profile, entrypoint, attrib_list, num_attribs, config_id );
/* record the current entrypoint for further trace/fool determination */
- VA_TRACE_FUNC(va_TraceCreateConfig, dpy, profile, entrypoint, attrib_list, num_attribs, config_id);
+ VA_TRACE_LOG(va_TraceCreateConfig, dpy, profile, entrypoint, attrib_list, num_attribs, config_id);
VA_FOOL_FUNC(va_FoolCreateConfig, dpy, profile, entrypoint, attrib_list, num_attribs, config_id);
return vaStatus;
flag, render_targets, num_render_targets, context );
/* keep current encode/decode resoluton */
- VA_TRACE_FUNC(va_TraceCreateContext, dpy, config_id, picture_width, picture_height, flag, render_targets, num_render_targets, context);
+ VA_TRACE_LOG(va_TraceCreateContext, dpy, config_id, picture_width, picture_height, flag, render_targets, num_render_targets, context);
return vaStatus;
}
CHECK_DISPLAY(dpy);
ctx = CTX(dpy);
- VA_TRACE_FUNC(va_TraceBeginPicture, dpy, context, render_target);
+ VA_TRACE_LOG(va_TraceBeginPicture, dpy, context, render_target);
VA_FOOL_RETURN();
va_status = ctx->vtable->vaBeginPicture( ctx, context, render_target );
VAContextID context
)
{
- VAStatus va_status;
+ VAStatus va_status = VA_STATUS_SUCCESS;
VADriverContextP ctx;
CHECK_DISPLAY(dpy);
ctx = CTX(dpy);
- /* dump encode source surface */
- VA_TRACE_SURFACE(va_TraceEndPicture, dpy, context, 0);
- /* return directly if do dummy operation */
- VA_FOOL_RETURN();
-
- va_status = ctx->vtable->vaEndPicture( ctx, context );
- /* dump decode dest surface */
+ if (fool_codec == 0)
+ va_status = ctx->vtable->vaEndPicture( ctx, context );
+
+ /* dump surface content */
VA_TRACE_SURFACE(va_TraceEndPicture, dpy, context, 1);
return va_status;