QCamera2: HAL3: Invalidate Heap buffer frame #'s after they return

Stale frame numbers in the Heap buffer association can cause the
WUDL buffer tracking to go out of sync.

Change addresses above issue by ensuring when the heap buffers are
released back to the free pool invalidate the stored older framenumbers

Ack-by: Mansoor Aftab

Change-Id: I377948cfd682592ba78dadb7c5abd51919ab576a
diff --git a/QCamera2/HAL3/QCamera3Channel.cpp b/QCamera2/HAL3/QCamera3Channel.cpp
index cce1c69..f7790ec 100644
--- a/QCamera2/HAL3/QCamera3Channel.cpp
+++ b/QCamera2/HAL3/QCamera3Channel.cpp
@@ -2973,6 +2973,8 @@
             return BAD_VALUE;
+        mMemory.markFrameNumber(bufferIndex, -1);
+        //Move heap buffer into free pool and invalidate the frame number
         ppInfo = mOfflinePpInfoList.erase(ppInfo);
         // Return pending buffer callbacks