mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
v4l2: free the queued buffers
Only free the queued buffers that we keep track of in our buffer array. for rw io-mode, we do allocate buffers but we don't keep track of them in the buffer array.
This commit is contained in:
parent
5d7d4e0d9b
commit
713ddbf541
1 changed files with 2 additions and 3 deletions
|
@ -458,9 +458,8 @@ gst_v4l2_buffer_pool_stop (GstBufferPool * bpool)
|
|||
ret = GST_BUFFER_POOL_CLASS (parent_class)->stop (bpool);
|
||||
|
||||
/* then free the remaining buffers */
|
||||
for (n = 0; n < pool->num_allocated; n++) {
|
||||
if (pool->buffers[n])
|
||||
gst_v4l2_buffer_pool_free_buffer (bpool, pool->buffers[n]);
|
||||
for (n = 0; n < pool->num_queued; n++) {
|
||||
gst_v4l2_buffer_pool_free_buffer (bpool, pool->buffers[n]);
|
||||
}
|
||||
g_free (pool->buffers);
|
||||
pool->buffers = NULL;
|
||||
|
|
Loading…
Reference in a new issue