Commit 4539b69f authored by liberato@chromium.org's avatar liberato@chromium.org Committed by Commit Bot

Skip check for |codec_| during re-init.

During re-init, we sometimes don't have a codec.  This causes a
dcheck if we also decide to re-init the codec to increase the
input buffer size.

If there really is no codec when we re-init (e.g., if we're already
in the middle of a reallocation from a previous re-init), then we'll
just re-re-init the codec and continue.  So, just omit the DCHECK.

Bug: 1048341
Change-Id: I199c4ccdce1c169be069ab96593188de76250648
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2036277Reviewed-by: default avatarDale Curtis <dalecurtis@chromium.org>
Commit-Queue: Frank Liberato <liberato@chromium.org>
Cr-Commit-Position: refs/heads/master@{#742260}
parent ddbeb31b
...@@ -359,7 +359,6 @@ void MediaCodecVideoDecoder::Initialize(const VideoDecoderConfig& config, ...@@ -359,7 +359,6 @@ void MediaCodecVideoDecoder::Initialize(const VideoDecoderConfig& config,
last_width_ = width; last_width_ = width;
} else if (width > last_width_ * kReallocateThreshold && device_info_ && } else if (width > last_width_ * kReallocateThreshold && device_info_ &&
device_info_->SdkVersion() > base::android::SDK_VERSION_P) { device_info_->SdkVersion() > base::android::SDK_VERSION_P) {
DCHECK(codec_);
// Reallocate the codec the next time we queue input, once there are no // Reallocate the codec the next time we queue input, once there are no
// outstanding output buffers. Note that |deferred_flush_pending_| might // outstanding output buffers. Note that |deferred_flush_pending_| might
// already be set, which is fine. We're just upgrading the flush. // already be set, which is fine. We're just upgrading the flush.
......
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