mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-26 02:00:33 +00:00
vaapivideomemory: load VA Image when mapping to write
When calling gst_video_frame_map() with GST_MAP_WRITE flag, it doesn't call ensure_image_is_current(), which means it doesn't guarentee VAImage is valid in this case. https://bugzilla.gnome.org/show_bug.cgi?id=766978
This commit is contained in:
parent
5ed967088f
commit
c67edea4ab
1 changed files with 4 additions and 2 deletions
|
@ -208,8 +208,10 @@ gst_video_meta_map_vaapi_memory (GstVideoMeta * meta, guint plane,
|
||||||
if (!ensure_image (mem))
|
if (!ensure_image (mem))
|
||||||
goto error_ensure_image;
|
goto error_ensure_image;
|
||||||
|
|
||||||
// Load VA image from surface
|
/* Load VA image from surface only on read OR write, not both.
|
||||||
if ((flags & GST_MAP_READ) && !ensure_image_is_current (mem))
|
* Refer to bugs #704078 and #704083 */
|
||||||
|
if (((flags & GST_MAP_READWRITE) != GST_MAP_READWRITE)
|
||||||
|
&& !ensure_image_is_current (mem))
|
||||||
goto error_no_current_image;
|
goto error_no_current_image;
|
||||||
|
|
||||||
if (!gst_vaapi_image_map (mem->image))
|
if (!gst_vaapi_image_map (mem->image))
|
||||||
|
|
Loading…
Reference in a new issue