Skip to content

Commit

Permalink
xvimagesink: Put error message into debug output instead of just thro…
Browse files Browse the repository at this point in the history
…wing it away
  • Loading branch information
sdroege committed Oct 4, 2015
1 parent 4115814 commit 19d714f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sys/xvimage/xvimagepool.c
Expand Up @@ -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);
Expand All @@ -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;
}
}
Expand Down

0 comments on commit 19d714f

Please sign in to comment.