Handle empty GOF.

Assume that stream has single temporal layer if number of frames in GOF
is set to zero (valid case).

Bug: chromium:879584
Change-Id: I7ced082190e40c1bf4cc1468babfd98b0a61f0dd
Reviewed-on: https://webrtc-review.googlesource.com/98800
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24622}
This commit is contained in:
Sergey Silkin
2018-09-07 11:49:38 +02:00
committed by Commit Bot
parent 3445b6bc51
commit 2f864fb4ab
2 changed files with 24 additions and 4 deletions

View File

@ -1360,5 +1360,19 @@ TEST_F(TestRtpFrameReferenceFinder, Vp9GofTidTooHigh) {
CheckReferencesVp9(0, 0);
}
TEST_F(TestRtpFrameReferenceFinder, Vp9GofZeroFrames) {
uint16_t pid = Rand();
uint16_t sn = Rand();
GofInfoVP9 ss;
ss.num_frames_in_gof = 0;
InsertVp9Gof(sn, sn, true, pid, 0, 0, 0, false, &ss);
InsertVp9Gof(sn + 1, sn + 1, false, pid + 1, 0, 0, 1);
ASSERT_EQ(2UL, frames_from_callback_.size());
CheckReferencesVp9(0, 0);
CheckReferencesVp9(1, 0, 0);
}
} // namespace video_coding
} // namespace webrtc