GST_OBJECT_LOCK (allocator);
- if (!allocator->active)
+ if (!g_atomic_int_get (&allocator->active))
goto done;
bcreate.memory = allocator->memory;
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)
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) {
GST_OBJECT_LOCK (allocator);
- if (!allocator->active)
+ if (!g_atomic_int_get (&allocator->active))
goto done;
for (i = 0; i < allocator->count; i++) {