xvimagesink: Put error message into debug output instead of just throwing it away

This commit is contained in:
Sebastian Dröge 2015-10-04 18:36:00 +01:00
parent 4115814f36
commit 19d714fa2f

View file

@ -167,13 +167,14 @@ xvimage_buffer_pool_alloc (GstBufferPool * pool, GstBuffer ** buffer,
GstVideoInfo *info; GstVideoInfo *info;
GstBuffer *xvimage; GstBuffer *xvimage;
GstMemory *mem; GstMemory *mem;
GError *err = NULL;
info = &xvpool->info; info = &xvpool->info;
xvimage = gst_buffer_new (); xvimage = gst_buffer_new ();
mem = gst_xvimage_allocator_alloc (xvpool->allocator, xvpool->im_format, 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) { if (mem == NULL) {
gst_buffer_unref (xvimage); gst_buffer_unref (xvimage);
@ -196,7 +197,8 @@ xvimage_buffer_pool_alloc (GstBufferPool * pool, GstBuffer ** buffer,
/* ERROR */ /* ERROR */
no_buffer: 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; return GST_FLOW_ERROR;
} }
} }