plugins: fix creation of video buffer from surface proxy.

Fix a regression introduced with commit 8ef490a.
This commit is contained in:
Gwenole Beauchesne 2012-07-25 15:11:51 +02:00
parent efe623c253
commit 5a1293a27e

View file

@ -120,10 +120,15 @@ GstBuffer *
gst_vaapi_video_buffer_new_with_surface_proxy(GstVaapiSurfaceProxy *proxy) gst_vaapi_video_buffer_new_with_surface_proxy(GstVaapiSurfaceProxy *proxy)
{ {
GstVaapiDisplay *display; GstVaapiDisplay *display;
GstVaapiSurface *surface;
g_return_val_if_fail(GST_VAAPI_IS_SURFACE_PROXY(proxy), NULL); g_return_val_if_fail(GST_VAAPI_IS_SURFACE_PROXY(proxy), NULL);
display = gst_vaapi_object_get_display(GST_VAAPI_OBJECT(proxy)); surface = gst_vaapi_surface_proxy_get_surface(proxy);
if (!surface)
return NULL;
display = gst_vaapi_object_get_display(GST_VAAPI_OBJECT(surface));
if (!display) if (!display)
return NULL; return NULL;