From 19d714fa2f95f67c9ad94db7c359a1c7affe40d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sun, 4 Oct 2015 18:36:00 +0100 Subject: [PATCH] xvimagesink: Put error message into debug output instead of just throwing it away --- sys/xvimage/xvimagepool.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/xvimage/xvimagepool.c b/sys/xvimage/xvimagepool.c index bde949c9c0..235a9f94e0 100644 --- a/sys/xvimage/xvimagepool.c +++ b/sys/xvimage/xvimagepool.c @@ -167,13 +167,14 @@ xvimage_buffer_pool_alloc (GstBufferPool * pool, GstBuffer ** buffer, GstVideoInfo *info; GstBuffer *xvimage; GstMemory *mem; + GError *err = NULL; info = &xvpool->info; xvimage = gst_buffer_new (); mem = gst_xvimage_allocator_alloc (xvpool->allocator, xvpool->im_format, - xvpool->padded_width, xvpool->padded_height, &xvpool->crop, NULL); + xvpool->padded_width, xvpool->padded_height, &xvpool->crop, &err); if (mem == NULL) { gst_buffer_unref (xvimage); @@ -196,7 +197,8 @@ xvimage_buffer_pool_alloc (GstBufferPool * pool, GstBuffer ** buffer, /* ERROR */ no_buffer: { - GST_WARNING_OBJECT (pool, "can't create image"); + GST_WARNING_OBJECT (pool, "can't create image: %s", err->message); + g_clear_error (&err); return GST_FLOW_ERROR; } }