Skip to content

va: bufferpool: use release_buffer to clean the mem.

He Junyan requested to merge He_Junyan/gst-plugins-bad:VA_BUFFER_NO_START into master

The current bufferpool wastes all pre-allocate buffers when the buffer pool is actived. The pool->priv->size is 0 for va buffer pool. And every time, the reset_buffer() will clean all mem and make the buffer size 0, that can cache the gst_buffer in the buffer pool. But when the buffer pool is activing, the default_start() just allocate the buffer and release_buffer() immediately, all the pre allocated buffers and surfaces are destroyed because of gst_buffer_get_size (buffer) != pool->priv->size.

We use release_buffer() to replace the reset_buffer() can avoid this.

Merge request reports