Commit 5080b473 authored by Dale Curtis's avatar Dale Curtis Committed by Commit Bot

[audio_discard] Turn unexpected CHECK into failure message.

For simplicity during AudioDiscardHelper implementation, we just CHECK'd
that some things couldn't happen. Turns out one of those cases is now
happening (likely due to some ffmpeg change), so turn it into a failure
case with a DLOG(ERROR).

BUG=987121
R=chcunningham

Change-Id: If18c313bb9aefd174dd428a15c2e1ce53254dedc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1807704
Auto-Submit: Dale Curtis <dalecurtis@chromium.org>
Commit-Queue: Chrome Cunningham <chcunningham@chromium.org>
Reviewed-by: default avatarChrome Cunningham <chcunningham@chromium.org>
Cr-Commit-Position: refs/heads/master@{#697099}
parent 381b1e78
......@@ -156,7 +156,13 @@ bool AudioDiscardHelper::ProcessBuffers(const DecoderBuffer& encoded_buffer,
// For simplicity require the start of the discard to be within the current
// buffer. Doing so allows us avoid complexity around tracking discards
// across buffers.
CHECK_LT(discard_start, decoded_frames);
if (discard_start >= decoded_frames) {
DLOG(ERROR)
<< "Unsupported discard padding and decoder delay mix. Due to "
"decoder delay, discard padding indicates data beyond the current "
"buffer should be discarded. This is not supported.";
return false;
}
const size_t frames_to_discard =
std::min(start_frames_to_discard, decoded_frames - discard_start);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment