tests: simple-decoder: fix for non-X11 backends.
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>
Tue, 24 Sep 2013 14:21:11 +0000 (16:21 +0200)
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>
Tue, 24 Sep 2013 14:24:05 +0000 (16:24 +0200)
Don't try to create pixmaps if we have not requested that feature. This
fixes execution for non-X11 backends, and most specifically DRM video
output mode.

tests/simple-decoder.c

index 5b50c87752bfc9ff8e83ad6c68e3102e2367869a..3c434d064608147bf483ce31ce81c8657f240a40 100644 (file)
@@ -498,7 +498,7 @@ renderer_process(App *app, RenderFrame *rfp)
     ensure_window_size(app, surface);
 
     crop_rect = gst_vaapi_surface_proxy_get_crop_rect(rfp->proxy);
-    if (!ensure_pixmaps(app, surface, crop_rect))
+    if (g_use_pixmap && !ensure_pixmaps(app, surface, crop_rect))
         SEND_ERROR("failed to create intermediate pixmaps");
 
     if (!gst_vaapi_surface_sync(surface))