vaapivideomemory: destroy derived image at unmap

If the allocator was configured to use direct upload or rendering, the
generated derived image created at mapping needs to be destroyed after
unmapping, because, in order to process the surface, it should not be marked
as "busy" by the driver.
This commit is contained in:
Víctor Manuel Jáquez Leal 2016-10-20 19:31:58 +02:00
parent ce8b14858f
commit 2761e472af

View file

@ -325,6 +325,11 @@ gst_video_meta_unmap_vaapi_memory (GstVideoMeta * meta, guint plane,
GST_VAAPI_VIDEO_MEMORY_FLAG_SET (mem,
GST_VAAPI_VIDEO_MEMORY_FLAG_IMAGE_IS_CURRENT);
}
if (!use_native_formats (mem->usage_flag)) {
gst_vaapi_video_meta_set_image (mem->meta, NULL);
gst_vaapi_video_memory_reset_image (mem);
}
}
}
return TRUE;