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

Unified Diff: webrtc/video/video_send_stream_tests.cc

Issue 1327933003: Enable probing with repeated payload packets by default. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixing yet another flake in libjingle tests. Created 5 years, 3 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/video/end_to_end_tests.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/video_send_stream_tests.cc
diff --git a/webrtc/video/video_send_stream_tests.cc b/webrtc/video/video_send_stream_tests.cc
index c55809955723e50953d0adce8026c32050ea400c..728ed64657a5cc241eafc443d7a72519e78fc4e2 100644
--- a/webrtc/video/video_send_stream_tests.cc
+++ b/webrtc/video/video_send_stream_tests.cc
@@ -539,10 +539,15 @@ void VideoSendStreamTest::TestPacketFragmentationSize(VideoFormat format,
TriggerLossReport(header);
if (test_generic_packetization_) {
- size_t overhead = header.headerLength + header.paddingLength +
- (1 /* Generic header */);
- if (use_fec_)
- overhead += 1; // RED for FEC header.
+ size_t overhead = header.headerLength + header.paddingLength;
+ // Only remove payload header and RED header if the packet actually
+ // contains payload.
+ if (length > overhead) {
+ overhead += (1 /* Generic header */);
+ if (use_fec_)
+ overhead += 1; // RED for FEC header.
+ }
+ EXPECT_GE(length, overhead);
accumulated_payload_ += length - overhead;
}
@@ -1843,19 +1848,21 @@ class VP9HeaderObeserver : public test::SendTest {
size_t payload_length =
length - header.headerLength - header.paddingLength;
- bool parse_vp9header_successful =
- vp9depacketizer.Parse(&vp9payload, vp9_packet, payload_length);
- bool is_vp9_codec_type =
- vp9payload.type.Video.codec == RtpVideoCodecTypes::kRtpVideoVp9;
- EXPECT_TRUE(parse_vp9header_successful);
- EXPECT_TRUE(is_vp9_codec_type);
-
- RTPVideoHeaderVP9* vp9videoHeader =
- &vp9payload.type.Video.codecHeader.VP9;
- if (parse_vp9header_successful && is_vp9_codec_type) {
- InspectHeader(vp9videoHeader);
- } else {
- observation_complete_->Set();
+ if (payload_length > 0) {
+ bool parse_vp9header_successful =
+ vp9depacketizer.Parse(&vp9payload, vp9_packet, payload_length);
+ bool is_vp9_codec_type =
+ vp9payload.type.Video.codec == RtpVideoCodecTypes::kRtpVideoVp9;
+ EXPECT_TRUE(parse_vp9header_successful);
+ EXPECT_TRUE(is_vp9_codec_type);
+
+ RTPVideoHeaderVP9* vp9videoHeader =
+ &vp9payload.type.Video.codecHeader.VP9;
+ if (parse_vp9header_successful && is_vp9_codec_type) {
+ InspectHeader(vp9videoHeader);
+ } else {
+ observation_complete_->Set();
+ }
}
}
« no previous file with comments | « webrtc/video/end_to_end_tests.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698