Skip to content

Instantly share code, notes, and snippets.

@BtbN
Last active December 27, 2015 12:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BtbN/7326386 to your computer and use it in GitHub Desktop.
Save BtbN/7326386 to your computer and use it in GitHub Desktop.
libva + intel-driver crash fix helper
diff --git a/va/va.h b/va/va.h
index d9e4c7e..dc0f092 100644
--- a/va/va.h
+++ b/va/va.h
@@ -1905,6 +1905,8 @@ VAStatus vaSyncSurface (
VASurfaceID render_target
);
+#define HAVE_VA_SURFACE_STATUS_EMPTY 1
+
typedef enum
{
VASurfaceRendering = 1, /* Rendering in progress */
@@ -1912,7 +1914,8 @@ typedef enum
/* this status is useful if surface is used as the source */
/* of an overlay */
VASurfaceReady = 4, /* not being rendered or displayed */
- VASurfaceSkipped = 8 /* Indicate a skipped frame during encode */
+ VASurfaceSkipped = 8, /* Indicate a skipped frame during encode */
+ VASurfaceEmpty = 16 /* contains no actual data */
} VASurfaceStatus;
/*
diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
index 31dafa2..a58eb7b 100755
--- a/src/i965_drv_video.c
+++ b/src/i965_drv_video.c
@@ -2358,7 +2358,11 @@ i965_QuerySurfaceStatus(VADriverContextP ctx,
*status = VASurfaceReady;
}
} else {
+#ifdef HAVE_VA_SURFACE_STATUS_EMPTY
+ *status = VASurfaceReady | VASurfaceEmpty;
+#else
*status = VASurfaceReady;
+#endif
}
return VA_STATUS_SUCCESS;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment