MediaCodec: fix possible crash at stop & error

If an error occurred during stop() operation but the operation
completed anyway, it may lead to an assert because the error already
sent response to pending reply.

Bug: 154678891
Test: atest CtsMediaTestCases -- --module-arg CtsMediaTestCases:size:small
Test: atest mediacodecTest
Merged-In: Id88d546a22db26495a6d535cbf3e191a21ea21fd
Change-Id: Id88d546a22db26495a6d535cbf3e191a21ea21fd
4 files changed