From b9b8c26c4012a7c8df1effc19cd55c52d36cba76 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Mon, 14 Nov 2016 17:40:37 +0100 Subject: [PATCH] vaapivideomemory: log error if not VA image Log an error message if the test image for surface downloading cannot be allocated or mapped. --- gst/vaapi/gstvaapivideomemory.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/gst/vaapi/gstvaapivideomemory.c b/gst/vaapi/gstvaapivideomemory.c index 00955cd..9fa69fc 100644 --- a/gst/vaapi/gstvaapivideomemory.c +++ b/gst/vaapi/gstvaapivideomemory.c @@ -805,9 +805,9 @@ allocator_configure_image_info (GstVaapiDisplay * display, image = new_image (display, &allocator->image_info); if (!image) - goto bail; + goto error; if (!gst_vaapi_image_map (image)) - goto bail; + goto error; gst_video_info_update_from_image (&allocator->image_info, image); gst_vaapi_image_unmap (image); @@ -815,6 +815,14 @@ allocator_configure_image_info (GstVaapiDisplay * display, bail: if (image) gst_vaapi_object_unref (image); + return; + + /* ERRORS */ +error: + { + GST_ERROR_OBJECT (allocator, "Cannot create or map a VA image"); + goto bail; + } } GstAllocator * -- 2.7.4