Ensure we actually toss all MediaCodec indices after flush().
Depending on which process the MediaCodec is running in, there may already be a non-default looper and handler which results in stale input/output indexes being delivered to the bridge after start(). To prevent this, we now call start() immediately after flush(), but post the clearing of mPendingStart through the handler/looper. A sequence counter is added so that rapid flush()/stop() calls don't prematurely use invalid indices. BUG=892591 TEST=Run chrome with --in-process-gpu and seek a bunch on any video. Change-Id: I8c60a73b8c00c85a7ab3d253bc8df2397c1fa00d Reviewed-on: https://chromium-review.googlesource.com/c/1278293Reviewed-by:Frank Liberato <liberato@chromium.org> Commit-Queue: Dale Curtis <dalecurtis@chromium.org> Cr-Commit-Position: refs/heads/master@{#599283}
Showing
Please register or sign in to comment