Commit 2bed4c9d authored by miu's avatar miu Committed by Commit bot

[Cast] Crash fix for certain vp8 video frame resize attempts.

BUG=462799
TEST=Resized CrOS Ash-desktop-in-a-window on my local dev workstation to confirm crash is resolved.

Review URL: https://codereview.chromium.org/965093002

Cr-Commit-Position: refs/heads/master@{#318767}
parent 3e740be5
...@@ -80,9 +80,10 @@ void Vp8Encoder::ConfigureForNewFrameSize(const gfx::Size& frame_size) { ...@@ -80,9 +80,10 @@ void Vp8Encoder::ConfigureForNewFrameSize(const gfx::Size& frame_size) {
<< frame_size.ToString(); << frame_size.ToString();
config_.g_w = frame_size.width(); config_.g_w = frame_size.width();
config_.g_h = frame_size.height(); config_.g_h = frame_size.height();
CHECK_EQ(vpx_codec_enc_config_set(&encoder_, &config_), VPX_CODEC_OK) if (vpx_codec_enc_config_set(&encoder_, &config_) == VPX_CODEC_OK)
<< "Failed to update frame size in encoder config."; return;
return; DVLOG(1) << "libvpx rejected the attempt to use a smaller frame size in "
"the current instance.";
} }
DVLOG(1) << "Destroying/Re-Creating encoder for larger frame size: " DVLOG(1) << "Destroying/Re-Creating encoder for larger frame size: "
......
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