Chromium Code Reviews
DescriptionFix 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=615141
TEST= Setup GpuVideoDecoder to fail 10% and refreshed the page for
several minutes. Hard to test the end to end though...
Committed: https://crrev.com/4849043c3e003ef57a431552f9a97cf159debd06
Cr-Commit-Position: refs/heads/master@{#396371}
Patch Set 1 #Patch Set 2 : #
Total comments: 2
Patch Set 3 : Typo in comments #Messages
Total messages: 13 (5 generated)
|