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:29:30 -0500 |
commit | 5adc9b1d2f28c6ce298229c45347d4f2ea2d47fb (patch) | |
tree | e601e06b3886d22f57aabd9d208a34ece1de4057 | |
parent | 2ec92613486aa34ed43206b3a27709c336008310 (diff) | |
download | gstreamer-plugins-base-5adc9b1d2f28c6ce298229c45347d4f2ea2d47fb.tar.gz |
xvimageallocator: Fix build warning error
Fix unused variable build error if HAVE_XSHM is undefined
https://bugzilla.gnome.org/show_bug.cgi?id=790329
-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 3a2728c23..a8c635884 100644 --- a/sys/xvimage/xvimageallocator.c +++ b/sys/xvimage/xvimageallocator.c @@ -350,7 +350,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; @@ -528,14 +530,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); @@ -549,6 +543,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); |