Bump version to use ffmpeg 5
This commit is contained in:
@ -1,13 +1,18 @@
|
||||
use std::ops::{Deref, DerefMut};
|
||||
|
||||
#[cfg(not(feature = "ffmpeg_5_0"))]
|
||||
use ffi::*;
|
||||
#[cfg(not(feature = "ffmpeg_5_0"))]
|
||||
use libc::c_int;
|
||||
|
||||
use super::Opened;
|
||||
use codec::Context;
|
||||
#[cfg(not(feature = "ffmpeg_5_0"))]
|
||||
use frame;
|
||||
use util::format;
|
||||
use {packet, AudioService, ChannelLayout, Error};
|
||||
#[cfg(not(feature = "ffmpeg_5_0"))]
|
||||
use {packet, Error};
|
||||
use {AudioService, ChannelLayout};
|
||||
|
||||
pub struct Audio(pub Opened);
|
||||
|
||||
@ -17,6 +22,7 @@ impl Audio {
|
||||
note = "Underlying API avcodec_decode_audio4 has been deprecated since FFmpeg 3.1; \
|
||||
consider switching to send_packet() and receive_frame()"
|
||||
)]
|
||||
#[cfg(not(feature = "ffmpeg_5_0"))]
|
||||
pub fn decode<P: packet::Ref>(
|
||||
&mut self,
|
||||
packet: &P,
|
||||
@ -91,8 +97,11 @@ impl Audio {
|
||||
unsafe { (*self.as_ptr()).frame_size as u32 }
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "ffmpeg_5_0"))]
|
||||
pub fn frame_start(&self) -> Option<usize> {
|
||||
unsafe {
|
||||
// Removed in ffmpeg >= 5.0 in favor of using encoder
|
||||
// private options.
|
||||
match (*self.as_ptr()).timecode_frame_start {
|
||||
-1 => None,
|
||||
n => Some(n as usize),
|
||||
|
Reference in New Issue
Block a user