Commit 4a0be769 authored by Luca Barbato's avatar Luca Barbato Committed by Luca Barbato

Do not increment the the frame_count on flush

And remove the inner flush() since it is unused.
parent 3a2e8caf
......@@ -652,8 +652,11 @@ impl<T: Pixel> ContextInner<T> {
T: Pixel,
{
let idx = self.frame_count;
self.frame_q.insert(idx, frame.into());
self.frame_count += 1;
let frame = frame.into();
if frame.is_some() {
self.frame_count += 1;
}
self.frame_q.insert(idx, frame);
Ok(())
}
......@@ -918,11 +921,6 @@ impl<T: Pixel> ContextInner<T> {
}
}
pub fn flush(&mut self) {
self.frame_q.insert(self.frame_count, None);
self.frame_count += 1;
}
fn determine_frame_type(&mut self, frame_number: u64) -> FrameType {
if frame_number == 0 {
return FrameType::KEY;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment