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

Unified Diff: media/cast/sender/vp8_encoder.cc

Issue 965093002: [Cast] Crash fix for certain vp8 video frame resize attempts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/sender/vp8_encoder.cc
diff --git a/media/cast/sender/vp8_encoder.cc b/media/cast/sender/vp8_encoder.cc
index fae960e1b4fac2e77b2aa654ebeac7716f30429f..3d189cdec811bc8fd2146de9edb2d6cf78c3c080 100644
--- a/media/cast/sender/vp8_encoder.cc
+++ b/media/cast/sender/vp8_encoder.cc
@@ -80,9 +80,10 @@ void Vp8Encoder::ConfigureForNewFrameSize(const gfx::Size& frame_size) {
<< frame_size.ToString();
config_.g_w = frame_size.width();
config_.g_h = frame_size.height();
- CHECK_EQ(vpx_codec_enc_config_set(&encoder_, &config_), VPX_CODEC_OK)
- << "Failed to update frame size in encoder config.";
- return;
+ if (vpx_codec_enc_config_set(&encoder_, &config_) == VPX_CODEC_OK)
+ return;
+ DVLOG(1) << "libvp8 rejected the attempt to use a smaller frame size in "
Alpha Left Google 2015/02/28 01:08:36 nit: libvpx.
miu 2015/02/28 02:10:15 Done.
+ "the current instance.";
}
DVLOG(1) << "Destroying/Re-Creating encoder for larger frame size: "
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698