gstreamer 1.20: v4l2bufferpool spams "newly allocated buffer is not free"

Michiel Konstapel michiel at aanmelder.nl
Fri Jun 24 13:53:32 UTC 2022


After updating from gstreamer 1.18 to 1.20.3, v4l2src keeps spamming 
warnings:

GST_DEBUG=3 gst-launch-1.0 v4l2src device=/dev/video2 ! image/jpeg ! 
jpegdec ! videoconvert ! autovideosink

v4l2bufferpool 
gstv4l2bufferpool.c:478:gst_v4l2_buffer_pool_alloc_buffer:<v4l2src0:pool0:src> 
newly allocated buffer 0 is not free
v4l2bufferpool 
gstv4l2bufferpool.c:478:gst_v4l2_buffer_pool_alloc_buffer:<v4l2src0:pool0:src> 
newly allocated buffer 1 is not free
v4l2bufferpool 
gstv4l2bufferpool.c:478:gst_v4l2_buffer_pool_alloc_buffer:<v4l2src0:pool0:src> 
newly allocated buffer 2 is not free
v4l2bufferpool 
gstv4l2bufferpool.c:478:gst_v4l2_buffer_pool_alloc_buffer:<v4l2src0:pool0:src> 
newly allocated buffer 3 is not free
v4l2bufferpool 
gstv4l2bufferpool.c:478:gst_v4l2_buffer_pool_alloc_buffer:<v4l2src0:pool0:src> 
newly allocated buffer 0 is not free
v4l2bufferpool 
gstv4l2bufferpool.c:478:gst_v4l2_buffer_pool_alloc_buffer:<v4l2src0:pool0:src> 
newly allocated buffer 1 is not free
v4l2bufferpool 
gstv4l2bufferpool.c:478:gst_v4l2_buffer_pool_alloc_buffer:<v4l2src0:pool0:src> 
newly allocated buffer 2 is not free
v4l2bufferpool 
gstv4l2bufferpool.c:478:gst_v4l2_buffer_pool_alloc_buffer:<v4l2src0:pool0:src> 
newly allocated buffer 3 is not free

If I increase the output to v4l2*:5 I see the following:

v4l2bufferpool 
gstv4l2bufferpool.c:778:gst_v4l2_buffer_pool_start:<v4l2src0:pool0:src> 
activating pool
v4l2bufferpool 
gstv4l2bufferpool.c:825:gst_v4l2_buffer_pool_start:<v4l2src0:pool0:src> 
requesting 4 MMAP buffers
v4l2allocator 
gstv4l2allocator.c:707:gst_v4l2_allocator_start:<v4l2src0:pool0:src:allocator> 
allocated 4 mmap buffers out of 4 requested
v4l2bufferpool 
gstv4l2bufferpool.c:843:gst_v4l2_buffer_pool_start:<v4l2src0:pool0:src> 
Uncertain or not enough buffers, enabling copy threshold
v4l2bufferpool 
gstv4l2bufferpool.c:1587:gst_v4l2_buffer_pool_complete_release_buffer:<v4l2src0:pool0:src> 
complete release buffer 0x55aafd63c5a0 (queued = no)
v4l2bufferpool 
gstv4l2bufferpool.c:1587:gst_v4l2_buffer_pool_complete_release_buffer:<v4l2src0:pool0:src> 
complete release buffer 0x55aafd63c6c0 (queued = no)
v4l2bufferpool 
gstv4l2bufferpool.c:1587:gst_v4l2_buffer_pool_complete_release_buffer:<v4l2src0:pool0:src> 
complete release buffer 0x55aafd63c7e0 (queued = no)
v4l2bufferpool 
gstv4l2bufferpool.c:1587:gst_v4l2_buffer_pool_complete_release_buffer:<v4l2src0:pool0:src> 
complete release buffer 0x55aafd63c900 (queued = no)
v4l2bufferpool 
gstv4l2bufferpool.c:696:gst_v4l2_buffer_pool_streamon:<v4l2src0:pool0:src> 
Started streaming
v4l2bufferpool 
gstv4l2bufferpool.c:1079:gst_v4l2_buffer_pool_flush_stop:<v4l2src0:pool0:src> 
stop flushing
v4l2bufferpool 
gstv4l2bufferpool.c:1489:gst_v4l2_buffer_pool_acquire_buffer:<v4l2src0:pool0:src> 
acquire
v4l2bufferpool 
gstv4l2bufferpool.c:1949:gst_v4l2_buffer_pool_process:<v4l2src0:pool0:src> 
process buffer 0x7f6f31680d08
     v4l2src gstv4l2src.c:1051:gst_v4l2src_create:<v4l2src0> ts: 
4:27:07.368257000 now 4:27:07.392314094 delay 0:00:00.024057094
v4l2bufferpool 
gstv4l2bufferpool.c:643:gst_v4l2_buffer_pool_resurrect_buffer:<v4l2src0:pool0:src> 
A buffer was lost, reallocating it
v4l2bufferpool 
gstv4l2bufferpool.c:1489:gst_v4l2_buffer_pool_acquire_buffer:<v4l2src0:pool0:src> 
acquire
v4l2bufferpool 
gstv4l2bufferpool.c:478:gst_v4l2_buffer_pool_alloc_buffer:<v4l2src0:pool0:src> 
newly allocated buffer 1 is not free

Despite the warnings, the pipeline appears to work, but I would prefer 
it to not spam warnings continuously :) Any ideas? This is on Ubuntu 
20.04, on different PCs and with different cameras.

Cheers,
Michiel



More information about the gstreamer-devel mailing list