Satisfying the compiler
Some checks reported warnings
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled

This commit is contained in:
Oliver Atkinson 2023-09-05 08:31:48 -06:00
parent bd7cc019cf
commit e9238660d8

View File

@ -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)?;
}
}