[Fuchsia] Fix FuchsiaAudioRenderer to handle seek correctly
FuchsiaAudioRenderer::FlushInternal() is called when seeking media stream. It's supposed to flush all pending buffers, so playback can resume from the new position. Problem was that there may be a demuxer read that's still pending when the function is called. Results of that read were still used after flush, but they may correspond to the previous position in the stream (before seek). As result the packet returned by the pending seek was sitting in the head of the queue blocking playback of all other packets for the new position after seek, breaking audio playback. This change updates FuchsiaAudioRenderer::OnDemuxerStreamReadDone() to drop results if FlushInternal() was called while the demuxer read operation was pending. Bug: b/167613125 Change-Id: I134eb54f5729194d419226bc2df53012a32c8d4b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2422886 Auto-Submit: Sergey Ulanov <sergeyu@chromium.org> Commit-Queue: David Dorwin <ddorwin@chromium.org> Reviewed-by:David Dorwin <ddorwin@chromium.org> Cr-Commit-Position: refs/heads/master@{#809686}
Showing
Please register or sign in to comment