From 5a1293a27e714d0a417d4e32291f80a9d36b29ae Mon Sep 17 00:00:00 2001 From: Gwenole Beauchesne Date: Wed, 25 Jul 2012 15:11:51 +0200 Subject: [PATCH] plugins: fix creation of video buffer from surface proxy. Fix a regression introduced with commit 8ef490a. --- gst/vaapi/gstvaapipluginbuffer.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gst/vaapi/gstvaapipluginbuffer.c b/gst/vaapi/gstvaapipluginbuffer.c index 7005a2b83a..33cb9176c3 100644 --- a/gst/vaapi/gstvaapipluginbuffer.c +++ b/gst/vaapi/gstvaapipluginbuffer.c @@ -120,10 +120,15 @@ GstBuffer * gst_vaapi_video_buffer_new_with_surface_proxy(GstVaapiSurfaceProxy *proxy) { GstVaapiDisplay *display; + GstVaapiSurface *surface; 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) return NULL;