As the buffer array is fixed size and small, it's safer to simply
use this static size to cleanup the buffers. This is also more
consistent with the rest. The associated method is no longer
required and can be dropped.
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;
-}
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__ */
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;