Revist C2HandleGralloc::WrapNativeHandle
Do not expose Move semantic of wrapping gralloc handle. And use cloned
handle inside C2HandleGralloc::WrapNativeHandle.
Bug: 123107921
Change-Id: If0335c3788cae2d13da215a998ed266ad3e3704c
diff --git a/media/codec2/sfplugin/Codec2Buffer.cpp b/media/codec2/sfplugin/Codec2Buffer.cpp
index 1113ae8..597e8f3 100644
--- a/media/codec2/sfplugin/Codec2Buffer.cpp
+++ b/media/codec2/sfplugin/Codec2Buffer.cpp
@@ -578,7 +578,7 @@
ALOGV("VideoNativeMetadata: %dx%d", buffer->width, buffer->height);
C2Handle *handle = WrapNativeCodec2GrallocHandle(
- native_handle_clone(buffer->handle),
+ buffer->handle,
buffer->width,
buffer->height,
buffer->format,