Commit 57c7492d authored by Alejandro Homs Puron's avatar Alejandro Homs Puron Committed by Sebastien Petitdemange

HwBufferMgr: fix SoftBufferAllocMgr (re)allocBuffers on FrameDim change

parent fd4638e9
......@@ -91,12 +91,13 @@ void SoftBufferAllocMgr::allocBuffers(int nb_buffers,
THROW_HW_ERROR(InvalidValue) << "Invalid "
<< DEB_VAR1(nb_buffers);
if (frame_dim != m_frame_dim)
releaseBuffers();
int curr_nb_buffers;
getNbBuffers(curr_nb_buffers);
int to_alloc = (nb_buffers - curr_nb_buffers);
if (frame_dim != m_frame_dim) {
releaseBuffers();
} else if (to_alloc == 0) {
int to_alloc = nb_buffers - curr_nb_buffers;
if (to_alloc == 0) {
DEB_TRACE() << "Nothing to do";
return;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment