diff --git a/sys/v4l2/gstv4l2allocator.c b/sys/v4l2/gstv4l2allocator.c index fcfa03c124..97f8752df8 100644 --- a/sys/v4l2/gstv4l2allocator.c +++ b/sys/v4l2/gstv4l2allocator.c @@ -1407,17 +1407,3 @@ gst_v4l2_allocator_reset_group (GstV4l2Allocator * allocator, gst_v4l2_allocator_reset_size (allocator, group); } - -gsize -gst_v4l2_allocator_num_allocated (GstV4l2Allocator * allocator) -{ - gsize num_allocated; - - GST_OBJECT_LOCK (allocator); - - num_allocated = allocator->count; - - GST_OBJECT_UNLOCK (allocator); - - return num_allocated; -} diff --git a/sys/v4l2/gstv4l2allocator.h b/sys/v4l2/gstv4l2allocator.h index 8200e03d42..d51f3d1b6f 100644 --- a/sys/v4l2/gstv4l2allocator.h +++ b/sys/v4l2/gstv4l2allocator.h @@ -153,8 +153,6 @@ GstV4l2MemoryGroup* gst_v4l2_allocator_dqbuf (GstV4l2Allocator * alloc void gst_v4l2_allocator_reset_group (GstV4l2Allocator * allocator, GstV4l2MemoryGroup * group); -gsize gst_v4l2_allocator_num_allocated (GstV4l2Allocator * allocator); - G_END_DECLS #endif /* __GST_V4L2_ALLOCATOR_H__ */ diff --git a/sys/v4l2/gstv4l2bufferpool.c b/sys/v4l2/gstv4l2bufferpool.c index 44197f19d8..c3ceb25769 100644 --- a/sys/v4l2/gstv4l2bufferpool.c +++ b/sys/v4l2/gstv4l2bufferpool.c @@ -904,11 +904,7 @@ gst_v4l2_buffer_pool_flush_stop (GstBufferPool * bpool) case GST_V4L2_IO_DMABUF: case GST_V4L2_IO_DMABUF_IMPORT: { - gsize num_allocated; - - num_allocated = gst_v4l2_allocator_num_allocated (pool->vallocator); - - for (i = 0; i < num_allocated; i++) { + for (i = 0; i < VIDEO_MAX_FRAME; i++) { /* Re-enqueue buffers */ if (pool->buffers[i]) { GstBufferPool *bpool = (GstBufferPool *) pool;