Chromium Code Reviews
DescriptionMerge M52: "Fix dropped demuxer buffers for fallback decoder"
An edge case was missed due to a typo in a DCHECK, during the original
fallback decoder submission.
Currently, the following scenario can happen:
- DecoderStream requests buffers from the demuxer
(STATE_PENDING_DEMUXER_READ).
- |decoder_| returns a DECODE_ERROR before a frame was ouptutted,
initiating a decoder fallback (STATE_REINITIALIZING_DECODER).
- OnDecoderSelected() successfully completes (STATE_NORMAL).
- OnBufferReady() is called back (the typo in the DCHECK meant we never
considered when we enter the function in STATE_NORMAL). We return at
line 601 because the state is not STATE_PENDING_DEMUXER_READ, and drop
the buffer.
This CL fixes the typo, and changes so we only drop the buffer whilst in
STATE_ERROR, and also handles the case where we had saved buffers in the
fallback buffer queue.
BUG=597605, 615141
TEST= Setup GpuVideoDecoder to fail 10% and refreshed the page for
several minutes. Hard to test the end to end though...
Review-Url: https://codereview.chromium.org/2012293002
Cr-Commit-Position: refs/heads/master@{#396371}
(cherry picked from commit 4849043c3e003ef57a431552f9a97cf159debd06)
Committed: https://chromium.googlesource.com/chromium/src/+/62136bd4d4f641a0f516badd93c200eaf2bca285
Patch Set 1 #
Messages
Total messages: 2 (1 generated)
|
|||||||||||||||||||