From c3643b42a44f57b76af95596383e3ff2f88c24be Mon Sep 17 00:00:00 2001 From: Gwenole Beauchesne Date: Thu, 24 Jul 2014 00:14:04 +0200 Subject: [PATCH] vaapivideomemory: forbid R/W mappings if non direct-rendering mode. Disable read-write mappings if "direct-rendering" is not supported. Since the ordering of read and write operations is not specified, this would require to always download the VA surface on _map(), then commit the temporary VA image back to the VA surface on _unmap(). Some SW decoding plug-in elements still use R/W mappings though. https://bugzilla.gnome.org/show_bug.cgi?id=733242 --- gst/vaapi/gstvaapivideomemory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst/vaapi/gstvaapivideomemory.c b/gst/vaapi/gstvaapivideomemory.c index 98d5004..1788125 100644 --- a/gst/vaapi/gstvaapivideomemory.c +++ b/gst/vaapi/gstvaapivideomemory.c @@ -160,7 +160,7 @@ gst_video_meta_map_vaapi_memory(GstVideoMeta *meta, guint plane, goto error_ensure_image; // Check that we can actually map the surface, or image - if ((flags & GST_MAP_READWRITE) == GST_MAP_WRITE && + if ((flags & GST_MAP_READWRITE) == GST_MAP_READWRITE && !mem->use_direct_rendering) goto error_unsupported_map; -- 2.7.4