From 900ed9f0f4a57b07315f54001981f2776f760fc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Zumer?= Date: Fri, 22 May 2020 16:05:54 -0400 Subject: [PATCH 1/2] Update the y4m dependency (cherry picked from commit fff4653c4e17eba3df4b10fad3fa299e8806c069) --- src/bin/decoder/y4m.rs | 4 ++-- src/bin/muxer/y4m.rs | 2 +- src/bin/rav1e.rs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/bin/decoder/y4m.rs b/src/bin/decoder/y4m.rs index b8d843871209..623a4bcac4d9 100644 --- a/src/bin/decoder/y4m.rs +++ b/src/bin/decoder/y4m.rs @@ -16,7 +16,7 @@ use crate::decoder::VideoDetails; use crate::Frame; use rav1e::prelude::*; -impl Decoder for y4m::Decoder<'_, Box> { +impl Decoder for y4m::Decoder> { fn get_video_details(&self) -> VideoDetails { let width = self.get_width(); let height = self.get_height(); @@ -77,7 +77,7 @@ impl From for DecodeError { y4m::Error::EOF => DecodeError::EOF, y4m::Error::BadInput => DecodeError::BadInput, y4m::Error::UnknownColorspace => DecodeError::UnknownColorspace, - y4m::Error::ParseError => DecodeError::ParseError, + y4m::Error::ParseError(_) => DecodeError::ParseError, y4m::Error::IoError(e) => DecodeError::IoError(e), // Note that this error code has nothing to do with the system running out of memory, // it means the y4m decoder has exceeded its memory allocation limit. diff --git a/src/bin/muxer/y4m.rs b/src/bin/muxer/y4m.rs index e26c31dc2ab0..c61ffa5daa3a 100644 --- a/src/bin/muxer/y4m.rs +++ b/src/bin/muxer/y4m.rs @@ -13,7 +13,7 @@ use std::io::Write; use std::slice; pub fn write_y4m_frame( - y4m_enc: &mut y4m::Encoder<'_, Box>, rec: &Frame, + y4m_enc: &mut y4m::Encoder>, rec: &Frame, y4m_details: VideoDetails, ) { let bytes_per_sample = if y4m_details.bit_depth > 8 { 2 } else { 1 }; diff --git a/src/bin/rav1e.rs b/src/bin/rav1e.rs index 704434cbba30..675171f64e27 100644 --- a/src/bin/rav1e.rs +++ b/src/bin/rav1e.rs @@ -100,7 +100,7 @@ fn process_frame( ctx: &mut Context, output_file: &mut dyn Muxer, source: &mut Source, pass1file: Option<&mut File>, pass2file: Option<&mut File>, buffer: &mut [u8], buf_pos: &mut usize, - mut y4m_enc: Option<&mut y4m::Encoder<'_, Box>>, + mut y4m_enc: Option<&mut y4m::Encoder>>, ) -> Result>, CliError> { let y4m_details = source.input.get_video_details(); let mut frame_summaries = Vec::new(); @@ -198,7 +198,7 @@ fn do_encode( cfg: Config, verbose: bool, mut progress: ProgressInfo, output: &mut dyn Muxer, source: &mut Source, pass1file_name: Option<&String>, pass2file_name: Option<&String>, - mut y4m_enc: Option>>, + mut y4m_enc: Option>>, ) -> Result<(), CliError> { let mut ctx: Context = cfg.new_context().map_err(|e| e.context("Invalid encoder settings"))?; -- 2.26.2