- {
- if(frame_history.size() >= config.history_size)
- frame_history.remove_object_number(0);
-
- frame_history.append(frame_buffer.get(0));
- frame_buffer.remove_number(0);
- }
-
-// Reduce history size
- while(frame_history.size() > config.history_size)
- frame_history.remove_object_number(0);
+ frame_history.append(frame_buffer.get(frame));
+ frame_buffer.remove_block(0, total_frames);