stagefright: Fix SurfaceMediaSource getting handle from wrong position issue
In function passMetadataBuffer_l, the bufferHandle(ANativeWindowBuffer) is saved to data (VideoNativeMetadata) but in function getMediaBufferHandle it gets the bufferHandle from (MediaBuffer*)buffer->data() + 4, which is a wrong position. To solve this problem, we should get handle from ANativeWindowBuffer, not from buffer->data() + 4. (If get bufferHandle from buffer->data() + 4, the function signalBufferReturned will print "returned buffer was not found in the current list" error. Test: Running wifi display, we can see the handle could be found in buffer list. Change-Id: I71ecf9e2bca1db67d8d6e862ac16b07e939bf521 Signed-off-by: zhangbo_a <zhangbo_a@pinecone.net> Signed-off-by: DennySPb <dennyspb@gmail.com>
Loading
Please register or sign in to comment