msm: vidc: fix a race condition in dynamic buffer handling

Fixes a race condition while ftb is queued to the driver
and release reference event for the same has been returned
from the firmware. Without this change, we would end up
having a buffer which is registered in the list but not
queued to firmware. As a result during flush this buffer is
not returned back to client and results in video freeze.

Change-Id: Iaf224a56a5b6c5042bdd662bb14cd63b29586854
Signed-off-by: Arun Menon <avmenon@codeaurora.org>
(cherry picked from commit ffd889ee71c5913025a15998c6aba82177e60576)
2 files changed