Skip to content

Commit

Permalink
fixed new clippy's
Browse files Browse the repository at this point in the history
  • Loading branch information
gerwin3 committed Aug 30, 2024
1 parent 05f4ba8 commit cf0d4d6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ pub fn output_raw_packetized_buf_start(
// signature. Since it changed since ffmpeg 7 and we don't know during compile time
// what verion we're dealing with, this trick will convert to the either the signature
// where the buffer argument is `*const u8` or `*mut u8`.
#[allow(clippy::missing_transmute_annotations)]
Some(std::mem::transmute::<*const (), _>(
output_raw_buf_start_callback as _,
)),
Expand Down
2 changes: 1 addition & 1 deletion src/ffi_hwaccel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ unsafe extern "C" fn hwaccel_get_format(
) -> ffmpeg::ffi::AVPixelFormat {
let mut p = pix_fmts;
while *p != ffmpeg::ffi::AVPixelFormat::AV_PIX_FMT_NONE {
if *p == std::mem::transmute((*ctx).opaque as i32) {
if *p == std::mem::transmute::<i32, ffmpeg::ffi::AVPixelFormat>((*ctx).opaque as i32) {
return *p;
}
p = p.add(1);
Expand Down
4 changes: 1 addition & 3 deletions src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,7 @@ impl Reader {
/// Seek to start of reader. This function performs best effort seeking to the start of the
/// file.
pub fn seek_to_start(&mut self) -> Result<()> {
self.input
.seek(i64::min_value(), ..)
.map_err(Error::BackendError)
self.input.seek(i64::MIN, ..).map_err(Error::BackendError)
}

/// Find the best video stream and return the index.
Expand Down

0 comments on commit cf0d4d6

Please sign in to comment.