|
|
@ -143,7 +143,7 @@ void FrameReader::decodeThread() { |
|
|
|
int idx = 0; |
|
|
|
int idx = 0; |
|
|
|
while (!exit_) { |
|
|
|
while (!exit_) { |
|
|
|
const int from = std::max(idx, 0); |
|
|
|
const int from = std::max(idx, 0); |
|
|
|
const int to = std::min(idx + 20, (int)frames_.size()); |
|
|
|
const int to = std::min(from + 20, (int)frames_.size()); |
|
|
|
for (int i = 0; i < frames_.size() && !exit_; ++i) { |
|
|
|
for (int i = 0; i < frames_.size() && !exit_; ++i) { |
|
|
|
Frame &frame = frames_[i]; |
|
|
|
Frame &frame = frames_[i]; |
|
|
|
if (i >= from && i < to) { |
|
|
|
if (i >= from && i < to) { |
|
|
|