Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Issue 2012293002: Fix dropped demuxer buffers for fallback decoder (Closed)

Created:
4 years, 7 months ago by tguilbert
Modified:
4 years, 7 months ago
CC:
chromium-reviews, feature-media-reviews_chromium.org, posciak+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

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=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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -5 lines) Patch
M media/filters/decoder_stream.cc View 1 2 3 chunks +17 lines, -5 lines 0 comments Download

Messages

Total messages: 13 (5 generated)
tguilbert
PTAL! :)
4 years, 7 months ago (2016-05-26 18:52:51 UTC) #2
DaleCurtis
lgtm nice catch! Is a unit test too had to write here?
4 years, 7 months ago (2016-05-26 18:55:54 UTC) #4
sandersd (OOO until July 31)
lgtm https://codereview.chromium.org/2012293002/diff/20001/media/filters/decoder_stream.cc File media/filters/decoder_stream.cc (right): https://codereview.chromium.org/2012293002/diff/20001/media/filters/decoder_stream.cc#newcode341 media/filters/decoder_stream.cc:341: // |pending_buffers_| has alreadby been copied to |fallback_buffers_| ...
4 years, 7 months ago (2016-05-26 18:56:47 UTC) #5
tguilbert
On 2016/05/26 18:55:54, DaleCurtis wrote: > lgtm nice catch! Is a unit test too had ...
4 years, 7 months ago (2016-05-26 21:58:26 UTC) #6
tguilbert
Thank you! https://codereview.chromium.org/2012293002/diff/20001/media/filters/decoder_stream.cc File media/filters/decoder_stream.cc (right): https://codereview.chromium.org/2012293002/diff/20001/media/filters/decoder_stream.cc#newcode341 media/filters/decoder_stream.cc:341: // |pending_buffers_| has alreadby been copied to ...
4 years, 7 months ago (2016-05-26 22:01:27 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2012293002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2012293002/40001
4 years, 7 months ago (2016-05-26 22:02:37 UTC) #10
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 7 months ago (2016-05-27 03:11:26 UTC) #11
commit-bot: I haz the power
4 years, 7 months ago (2016-05-27 03:12:36 UTC) #13
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/4849043c3e003ef57a431552f9a97cf159debd06
Cr-Commit-Position: refs/heads/master@{#396371}

Powered by Google App Engine
This is Rietveld 408576698