vaapivideomemory: forbid R/W mappings if non direct-rendering mode.
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>
Wed, 23 Jul 2014 22:14:04 +0000 (00:14 +0200)
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>
Wed, 23 Jul 2014 22:14:09 +0000 (00:14 +0200)
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

index 98d5004..1788125 100644 (file)
@@ -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;