CCodec: Delay stop using surface until the end of stop()
Delay stop using surface until the end of stop() in order not to
interface internal Codec work.
Bug: 227223204
Test: atest android.media.codec.cts.MediaCodecTest
Test: atest android.media.decoder.cts.AdaptivePlaybackTest
Change-Id: I3d12869e51ecee7c01a796c54f9fd26b0ed8e712
diff --git a/media/codec2/sfplugin/CCodecBufferChannel.h b/media/codec2/sfplugin/CCodecBufferChannel.h
index f29a225..61fb06f 100644
--- a/media/codec2/sfplugin/CCodecBufferChannel.h
+++ b/media/codec2/sfplugin/CCodecBufferChannel.h
@@ -149,6 +149,12 @@
std::map<size_t, sp<MediaCodecBuffer>> &&clientInputBuffers);
/**
+ * Stop using buffers of the current output surface for other Codec
+ * instances to use the surface safely.
+ */
+ void stopUseOutputSurface();
+
+ /**
* Stop queueing buffers to the component. This object should never queue
* buffers after this call, until start() is called.
*/