Commit 560c9cd5 authored by Luca Barbato's avatar Luca Barbato Committed by Luca Barbato
Browse files

Do not use NeedMoreData to signal that a frame had been encoded

parent e0961200
......@@ -550,6 +550,8 @@ pub enum EncoderStatus {
/// May be emitted by `Context::receive_packet` after a flush request had been processed
/// or the frame limit had been reached.
LimitReached,
/// A Frame had been encoded but not emitted yet
Encoded,
/// Generic fatal error
Failure,
}
......@@ -894,7 +896,7 @@ impl<T: Pixel> ContextInner<T> {
let fi = fi.clone();
self.finalize_packet(rec, &fi)
} else {
Err(EncoderStatus::NeedMoreData)
Err(EncoderStatus::Encoded)
}
} else {
Err(EncoderStatus::NeedMoreData)
......
......@@ -88,6 +88,7 @@ fn process_frame<T: Pixel, D: Decoder>(
Err(EncoderStatus::Failure) => {
panic!("Failed to encode video");
}
Err(EncoderStatus::Encoded) => {}
}
Some(frame_summaries)
}
......
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