VP9 temporal index bounds check.
Bug: chromium:838672 Change-Id: Ia531327858b6e40cb7fa03ca1b98c120ba4e1389 Reviewed-on: https://webrtc-review.googlesource.com/73701 Reviewed-by: Stefan Holmer <stefan@webrtc.org> Commit-Queue: Philip Eliasson <philipel@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23099}
This commit is contained in:
@ -1331,5 +1331,21 @@ TEST_F(TestRtpFrameReferenceFinder, Vp9GofPidJump) {
|
||||
InsertVp9Gof(sn + 1, sn + 1, false, pid + 1000, 0, 0, 1);
|
||||
}
|
||||
|
||||
TEST_F(TestRtpFrameReferenceFinder, Vp9GofTidTooHigh) {
|
||||
// Same as RtpFrameReferenceFinder::kMaxTemporalLayers.
|
||||
const int kMaxTemporalLayers = 5;
|
||||
uint16_t pid = Rand();
|
||||
uint16_t sn = Rand();
|
||||
GofInfoVP9 ss;
|
||||
ss.SetGofInfoVP9(kTemporalStructureMode2);
|
||||
ss.temporal_idx[1] = kMaxTemporalLayers;
|
||||
|
||||
InsertVp9Gof(sn, sn, true, pid, 0, 0, 0, false, &ss);
|
||||
InsertVp9Gof(sn + 1, sn + 1, false, pid + 1, 0, 0, 1);
|
||||
|
||||
ASSERT_EQ(1UL, frames_from_callback_.size());
|
||||
CheckReferencesVp9(0, 0);
|
||||
}
|
||||
|
||||
} // namespace video_coding
|
||||
} // namespace webrtc
|
||||
|
Reference in New Issue
Block a user