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, ...@@ -91,12 +91,13 @@ void SoftBufferAllocMgr::allocBuffers(int nb_buffers,
THROW_HW_ERROR(InvalidValue) << "Invalid " THROW_HW_ERROR(InvalidValue) << "Invalid "
<< DEB_VAR1(nb_buffers); << DEB_VAR1(nb_buffers);
if (frame_dim != m_frame_dim)
releaseBuffers();
int curr_nb_buffers; int curr_nb_buffers;
getNbBuffers(curr_nb_buffers); getNbBuffers(curr_nb_buffers);
int to_alloc = (nb_buffers - curr_nb_buffers); int to_alloc = nb_buffers - curr_nb_buffers;
if (frame_dim != m_frame_dim) { if (to_alloc == 0) {
releaseBuffers();
} else if (to_alloc == 0) {
DEB_TRACE() << "Nothing to do"; DEB_TRACE() << "Nothing to do";
return; 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