From 7986c55dcb6095a3bc379f17472374eeefc350b6 Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Wed, 14 May 2014 13:28:31 -0400 Subject: [PATCH] v4l2allocator: Fix use of atomic active marker https://bugzilla.gnome.org/show_bug.cgi?id=730207 --- sys/v4l2/gstv4l2allocator.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/v4l2/gstv4l2allocator.c b/sys/v4l2/gstv4l2allocator.c index ebc1f31542..c745a9be7c 100644 --- a/sys/v4l2/gstv4l2allocator.c +++ b/sys/v4l2/gstv4l2allocator.c @@ -500,7 +500,7 @@ gst_v4l2_allocator_create_buf (GstV4l2Allocator * allocator) GST_OBJECT_LOCK (allocator); - if (!allocator->active) + if (!g_atomic_int_get (&allocator->active)) goto done; bcreate.memory = allocator->memory; @@ -661,7 +661,7 @@ gst_v4l2_allocator_start (GstV4l2Allocator * allocator, guint32 count, GST_OBJECT_LOCK (allocator); - if (allocator->active) + if (g_atomic_int_get (&allocator->active)) goto already_active; if (v4l2_ioctl (allocator->video_fd, VIDIOC_REQBUFS, &breq) < 0) @@ -742,7 +742,7 @@ gst_v4l2_allocator_stop (GstV4l2Allocator * allocator) GST_OBJECT_LOCK (allocator); - if (!allocator->active) + if (!g_atomic_int_get (&allocator->active)) goto done; if (gst_atomic_queue_length (allocator->free_queue) != allocator->count) { @@ -1191,7 +1191,7 @@ gst_v4l2_allocator_flush (GstV4l2Allocator * allocator) GST_OBJECT_LOCK (allocator); - if (!allocator->active) + if (!g_atomic_int_get (&allocator->active)) goto done; for (i = 0; i < allocator->count; i++) {