video: msm: wfd: Set last encoded buffer in input thread

Setting last_buffer to the last encoded buffer in the output callback was
causing problems in concurrent encode/decode scenarios where the core would
take extra time in returning buffers. As a result, the timer would fire
and queue a stale frame to the encoder. This would result in the encoder
eventually returning a stale frame and video stream generator choosing
the stale frame as the last buffer.

CRs-Fixed: 330432
Change-Id: I50da57b1376c7811ec7255b501c4cc918133580b
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
2 files changed