codec: fix signature of Packet::write_interleaved
av_interleaved_write_frame never returns 1, so bool makes no sense: https://github.com/FFmpeg/FFmpeg/blob/n4.3.1/libavformat/avformat.h#L2592-L2635 Fixes #25.
This commit is contained in:
parent
f15408ccef
commit
5affb85148
@ -226,15 +226,14 @@ impl Packet {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn write_interleaved(&self, format: &mut format::context::Output) -> Result<bool, Error> {
|
pub fn write_interleaved(&self, format: &mut format::context::Output) -> Result<(), Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
if self.is_empty() {
|
if self.is_empty() {
|
||||||
return Err(Error::InvalidData);
|
return Err(Error::InvalidData);
|
||||||
}
|
}
|
||||||
|
|
||||||
match av_interleaved_write_frame(format.as_mut_ptr(), self.as_ptr() as *mut _) {
|
match av_interleaved_write_frame(format.as_mut_ptr(), self.as_ptr() as *mut _) {
|
||||||
1 => Ok(true),
|
0 => Ok(()),
|
||||||
0 => Ok(false),
|
|
||||||
e => Err(Error::from(e)),
|
e => Err(Error::from(e)),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user