diff options
author | Seungha Yang <pudding8757@gmail.com> | 2017-11-14 23:07:26 +0900 |
---|---|---|
committer | Nicolas Dufresne <nicolas.dufresne@collabora.com> | 2017-12-06 15:28:54 -0500 |
commit | e1e46b674f87f481c01851bc3f83aafc7258a440 (patch) | |
tree | 6dc30cd702255fcd476885b1d25b316cd5a0ccd6 /sys | |
parent | 427df2d5d9760b58362fa3604ef3f8e44cbf2018 (diff) | |
download | gst-plugins-base-e1e46b674f87f481c01851bc3f83aafc7258a440.tar.gz gst-plugins-base-e1e46b674f87f481c01851bc3f83aafc7258a440.tar.xz |
xvimageallocator: Fix build warning error
Fix unused variable build error if HAVE_XSHM is undefined
https://bugzilla.gnome.org/show_bug.cgi?id=790329
Diffstat (limited to 'sys')
-rw-r--r-- | sys/xvimage/xvimageallocator.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/sys/xvimage/xvimageallocator.c b/sys/xvimage/xvimageallocator.c index 429c5aaa7..bf1f2bd9e 100644 --- a/sys/xvimage/xvimageallocator.c +++ b/sys/xvimage/xvimageallocator.c @@ -351,7 +351,9 @@ gst_xvimage_allocator_alloc (GstXvImageAllocator * allocator, gint im_format, GstXvContext *context; gint align, offset; GstXvImageMemory *mem; +#ifdef HAVE_XSHM gint expected_size = 0; +#endif context = allocator->context; @@ -529,14 +531,6 @@ beach: return GST_MEMORY_CAST (mem); /* ERRORS */ -unexpected_size: - { - g_mutex_unlock (&context->lock); - g_set_error (error, GST_RESOURCE_ERROR, GST_RESOURCE_ERROR_WRITE, - "unexpected XShm image size (got %d, expected %d)", - mem->xvimage->data_size, expected_size); - goto beach; - } create_failed: { g_mutex_unlock (&context->lock); @@ -550,6 +544,14 @@ create_failed: goto beach; } #ifdef HAVE_XSHM +unexpected_size: + { + g_mutex_unlock (&context->lock); + g_set_error (error, GST_RESOURCE_ERROR, GST_RESOURCE_ERROR_WRITE, + "unexpected XShm image size (got %d, expected %d)", + mem->xvimage->data_size, expected_size); + goto beach; + } shmget_failed: { g_mutex_unlock (&context->lock); |