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

Unified Diff: webrtc/common_video/h264/pps_parser_unittest.cc

Issue 2532973002: Sanity check parsed QP values from H264 bitstream (Closed)
Patch Set: add one last range check Created 4 years 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/common_video/h264/pps_parser.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/common_video/h264/pps_parser_unittest.cc
diff --git a/webrtc/common_video/h264/pps_parser_unittest.cc b/webrtc/common_video/h264/pps_parser_unittest.cc
index b9ec92ba25e69fb8ce0f291e0fefba09776bb90f..03490647c08ef49ec691b113780c7897e60bc868 100644
--- a/webrtc/common_video/h264/pps_parser_unittest.cc
+++ b/webrtc/common_video/h264/pps_parser_unittest.cc
@@ -201,7 +201,7 @@ TEST_F(PpsParserTest, ZeroPps) {
TEST_F(PpsParserTest, MaxPps) {
generated_pps_.bottom_field_pic_order_in_frame_present_flag = true;
- generated_pps_.pic_init_qp_minus26 = std::numeric_limits<int32_t>::max();
+ generated_pps_.pic_init_qp_minus26 = 25;
generated_pps_.redundant_pic_cnt_present_flag = 1; // 1 bit value.
generated_pps_.weighted_bipred_idc = (1 << 2) - 1; // 2 bit value.
generated_pps_.weighted_pred_flag = true;
@@ -210,7 +210,7 @@ TEST_F(PpsParserTest, MaxPps) {
generated_pps_.sps_id = 1;
RunTest();
- generated_pps_.pic_init_qp_minus26 = std::numeric_limits<int32_t>::min() + 1;
+ generated_pps_.pic_init_qp_minus26 = -25;
RunTest();
}
« no previous file with comments | « webrtc/common_video/h264/pps_parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698