media/android: Ensure correct synchronization of video buffers.

The current code only waits on a fence from either GL or the android
framework depending on which was the last user of the buffer. However,
if that buffer is used by both these APIs, we should be waiting on
fences from both these consumers when releasing this buffer back to the
AImageReader. Fix that.,

Bug: 889328
Change-Id: I03623aea03fc894362758ced490caeb3487d9f63
Commit-Queue: Khushal <>
Commit-Queue: Frank Liberato <>
Auto-Submit: Khushal <>
Reviewed-by: Frank Liberato <>
Reviewed-by: Antoine Labour <>
Cr-Commit-Position: refs/heads/master@{#639127}
4 files changed