diff --git a/src/main.rs b/src/main.rs index 14d1a43..53d8711 100644 --- a/src/main.rs +++ b/src/main.rs @@ -10,7 +10,6 @@ use ffmpeg::media::Type; use ffmpeg::software::scaling::{context::Context, flag::Flags}; use ffmpeg::util::frame::video::Video; use std::path::Path; -use std::time::Instant; mod out; fn main() -> Result<(), Error> { @@ -26,7 +25,6 @@ fn main() -> Result<(), Error> { .best(Type::Video) .ok_or(ffmpeg::Error::StreamNotFound)?; let video_stream_index = input.index(); - let fps = input.avg_frame_rate(); let context_decoder = ffmpeg::codec::context::Context::from_parameters(input.parameters())?; // Ctx's video decoder @@ -54,7 +52,7 @@ fn main() -> Result<(), Error> { // test::print_raw(&rgb_frame.data(0)); // test::print_square(&rgb_frame.data(0), rgb_frame.width() as usize); - out::print_square(&rgb_frame, out::LinesFormat::RightLeft, video_stream_index); + out::print_square(&rgb_frame, out::LinesFormat::RightLeft, video_stream_index).unwrap(); // test::small_matrix(); } Ok(()) @@ -65,9 +63,6 @@ fn main() -> Result<(), Error> { // Is this for multiple video streams? if stream.index() == video_stream_index { decoder.send_packet(&packet)?; - - let now = Instant::now(); - receive_and_process_decoded_frames(&mut decoder)?; } }