[PATCH weston] compositor-drm: Don't use vaapi recorder with unsupported formats

Ander Conselvan de Oliveira conselvan2 at gmail.com
Tue May 6 06:49:06 PDT 2014


From: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira at intel.com>

We only support recording with GBM_FORMAT_XRGB888 format, so don't try
to record if the output has a differnt format.

https://bugs.freedesktop.org/show_bug.cgi?id=78199
---
 src/compositor-drm.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/compositor-drm.c b/src/compositor-drm.c
index 4441308..5f59789 100644
--- a/src/compositor-drm.c
+++ b/src/compositor-drm.c
@@ -2611,6 +2611,12 @@ recorder_binding(struct weston_seat *seat, uint32_t time, uint32_t key,
 			      struct drm_output, base.link);
 
 	if (!output->recorder) {
+		if (output->format != GBM_FORMAT_XRGB8888) {
+			weston_log("failed to start vaapi recorder: "
+				   "output format not supported\n");
+			return;
+		}
+
 		width = output->base.current_mode->width;
 		height = output->base.current_mode->height;
 
-- 
1.8.3.2



More information about the wayland-devel mailing list