pub enum DemuxError {
Ffmpeg(Error),
AttachmentAlloc {
stream_index: usize,
},
ParametersMissing {
stream_index: usize,
},
ParametersAlloc {
stream_index: usize,
},
ParametersCopy {
stream_index: usize,
source: Error,
},
PacketBuffer {
stream_index: usize,
source: PacketBufferError,
},
ReaderPanic {
message: SmolStr,
},
}Expand description
Errors from FfmpegDemuxer.
Variants§
Ffmpeg(Error)
The wrapped libavformat call reported an error — open, read or seek.
AttachmentAlloc
FFmpeg refused a buffer allocation while capturing an attachment’s payload at open time.
ParametersMissing
Codec parameters arrived that were never allocated.
ffmpeg_next::codec::Parameters has safe constructors that hand
back a null-backed value when FFmpeg’s allocation failed, and they
report nothing. Copying from one dereferences null, so it is
refused where it arrives — at construction, and again in the
copier — rather than crashing later somewhere that has forgotten
the allocator ever failed.
ParametersAlloc
Codec parameters for a track could not be allocated.
ParametersCopy
Copying a track’s codec parameters failed part way.
Fields
PacketBuffer
A packet’s payload could not be referenced — the bytes are there and this layer could not carry them.
Never raised for a packet that simply has no payload: an empty packet is a marker some demuxers emit, and it is skipped in silence. Distinguishing the two is what keeps a refcount failure under memory pressure from looking like the file’s own word and dropping real compressed bytes.
Fields
source: PacketBufferErrorWhat went wrong.
ReaderPanic
The Read + Seek source given to
FfmpegDemuxer::open_reader panicked inside a libavformat
callback.
The panic was caught before it could cross the extern "C"
boundary and abort the process; this is what it said. The session
is terminal — every later call reports the same panic.
Trait Implementations§
Source§impl Clone for DemuxError
impl Clone for DemuxError
Source§fn clone(&self) -> DemuxError
fn clone(&self) -> DemuxError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DemuxError
impl Debug for DemuxError
Source§impl Display for DemuxError
impl Display for DemuxError
Source§impl Error for DemuxError
impl Error for DemuxError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()