On some platforms, vaPutImage() would fail even if it does not involve
color format conversion or scaling, whereas copying raw pixels through
vaDeriveImage() could work instead.
{
GstVaapiDisplay *display;
GstVideoFormat format;
+ GstVaapiImage *surface_image;
GstVaapiSubpicture *subpicture;
+ gboolean success;
display = gst_vaapi_object_get_display(GST_VAAPI_OBJECT(surface));
if (!display)
if (gst_vaapi_surface_put_image(surface, image))
return TRUE;
+ surface_image = gst_vaapi_surface_derive_image(surface);
+ if (surface_image) {
+ success = gst_vaapi_image_copy(surface_image, image);
+ gst_vaapi_object_unref(surface_image);
+ if (success)
+ return TRUE;
+ }
+
g_print("could not upload %s image to surface\n",
gst_vaapi_video_format_to_string(format));