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

Unified Diff: webrtc/modules/video_coding/codecs/vp8/screenshare_layers_unittest.cc

Issue 1656233002: Avoid undefined behavior in vp8 screenshare_layers (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Test error + brain fartin ConfigureBitrates Created 4 years, 11 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 | « webrtc/modules/video_coding/codecs/vp8/screenshare_layers.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/video_coding/codecs/vp8/screenshare_layers_unittest.cc
diff --git a/webrtc/modules/video_coding/codecs/vp8/screenshare_layers_unittest.cc b/webrtc/modules/video_coding/codecs/vp8/screenshare_layers_unittest.cc
index f31ed5e4d824b9dc3f5219c6bde10591814556e2..e5e88942e4b88c08eb6433a78ad151bd4a50d021 100644
--- a/webrtc/modules/video_coding/codecs/vp8/screenshare_layers_unittest.cc
+++ b/webrtc/modules/video_coding/codecs/vp8/screenshare_layers_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include <vector>
+
#include "gtest/gtest.h"
#include "vpx/vpx_encoder.h"
#include "vpx/vp8cx.h"
@@ -41,6 +43,8 @@ class ScreenshareLayerTest : public ::testing::Test {
CodecSpecificInfoVP8* vp8_info,
int* flags) {
*flags = layers_->EncodeFlags(timestamp);
+ if (*flags == -1)
+ return;
layers_->PopulateCodecSpecific(base_sync, vp8_info, timestamp);
ASSERT_NE(-1, frame_size_);
layers_->FrameEncoded(frame_size_, timestamp, kDefaultQp);
« no previous file with comments | « webrtc/modules/video_coding/codecs/vp8/screenshare_layers.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698