vaapivideomemory: fix association of surface to proxy.

Make sure to always update the VA surface pointer whenever the proxy
changes. This used to only work when the VA surface is written to, in
interop with SW element ("upload" feature), and this now fixes cases
when the VA surface is needed for reading, in interop with SW element
("download" feature).
This commit is contained in:
Gwenole Beauchesne 2014-07-23 18:01:21 +02:00
parent dac20cecb4
commit b07de8a7f9

View file

@ -117,10 +117,9 @@ ensure_surface(GstVaapiVideoMemory *mem)
return FALSE;
gst_vaapi_video_meta_set_surface_proxy(mem->meta, mem->proxy);
}
mem->surface = GST_VAAPI_SURFACE_PROXY_SURFACE(mem->proxy);
}
g_return_val_if_fail(mem->surface != NULL, FALSE);
return TRUE;
mem->surface = GST_VAAPI_SURFACE_PROXY_SURFACE(mem->proxy);
return mem->surface != NULL;
}
gboolean