avoid crash in emptyBuffer when input buffer handle is invalid

Try to fail with error instead of crashing when the input buffer
handle to TWOmxNode::emptyBuffer is invalid. Save an unnecessary
handle clone, and let the convertTo to GraphicBuffer do the clone.
If the clone fails, return with error.

bug: 133254412
test: atest CtsMediaTestCases -- --module-arg CtsMediaTestCases:size:small
    Change-Id: I6abb5526d8df1e57b70c96f5b32d132e4a5de389

Change-Id: If5ca8fae449a3cdf790c967add3713ad73369f03
1 file changed