CCodec: drop buffer and not notify client if outputformat isn't changed for FLAG_DROP_FRAME.

Bug: 151995371
Test: local test ok.
Change-Id: I806c3af8e733abee38cb1d815b54f52135607b82
diff --git a/media/codec2/sfplugin/CCodecBufferChannel.cpp b/media/codec2/sfplugin/CCodecBufferChannel.cpp
index bbd91d0..369087d 100644
--- a/media/codec2/sfplugin/CCodecBufferChannel.cpp
+++ b/media/codec2/sfplugin/CCodecBufferChannel.cpp
@@ -1724,7 +1724,7 @@
         drop = true;
     }
 
-    if (notifyClient && !buffer && !flags && !drop) {
+    if (notifyClient && !buffer && !flags && !(drop && outputFormat)) {
         ALOGV("[%s] onWorkDone: Not reporting output buffer (%lld)",
               mName, work->input.ordinal.frameIndex.peekull());
         notifyClient = false;
@@ -1751,7 +1751,7 @@
             return false;
         }
         output->buffers->pushToStash(
-                buffer,
+                drop ? nullptr : buffer,
                 notifyClient,
                 timestamp.peek(),
                 flags,