Fix test FrameGenerator to work with a single file source

Bug: None
Change-Id: I645779379145c6c7b2d452dc1a15f9d9b97a3ee5
Reviewed-on: https://webrtc-review.googlesource.com/c/121641
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26567}
This commit is contained in:
Ilya Nikolaevskiy 2019-02-06 10:56:39 +01:00 committed by Commit Bot
parent cf416e43b6
commit 6cfb403791

View File

@ -382,7 +382,8 @@ class ScrollingImageFrameGenerator : public FrameGenerator {
}
void UpdateSourceFrame(size_t frame_num) {
while (current_frame_num_ != frame_num) {
while (current_frame_num_ != frame_num ||
current_source_frame_ == nullptr) {
current_source_frame_ = file_generator_.NextFrame();
current_frame_num_ = (current_frame_num_ + 1) % num_frames_;
}