mirror of
https://github.com/encounter/rust-ffmpeg.git
synced 2026-07-10 21:18:39 -07:00
style: run cargo fmt
This commit is contained in:
@@ -23,7 +23,13 @@ impl Drop for Destructor {
|
||||
match self.mode {
|
||||
Mode::Input => avformat_close_input(&mut self.ptr),
|
||||
Mode::Output => {
|
||||
if (*self.ptr).flags & AVFMT_NOFILE != 0 && !(*(*self.ptr).pb).av_class.is_null() {
|
||||
if (*self.ptr).flags & AVFMT_NOFILE != 0
|
||||
&& (*self.ptr)
|
||||
.pb
|
||||
.as_ref()
|
||||
.map(|pb| !(*pb).av_class.is_null())
|
||||
.unwrap_or(false)
|
||||
{
|
||||
avio_close((*self.ptr).pb);
|
||||
}
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@ pub struct Input {
|
||||
ptr: *mut AVInputFormat,
|
||||
}
|
||||
|
||||
unsafe impl Send for Input { }
|
||||
unsafe impl Sync for Input { }
|
||||
unsafe impl Send for Input {}
|
||||
unsafe impl Sync for Input {}
|
||||
|
||||
impl Input {
|
||||
pub unsafe fn wrap(ptr: *mut AVInputFormat) -> Self {
|
||||
|
||||
@@ -13,8 +13,8 @@ pub struct Output {
|
||||
ptr: *mut AVOutputFormat,
|
||||
}
|
||||
|
||||
unsafe impl Send for Output { }
|
||||
unsafe impl Sync for Output { }
|
||||
unsafe impl Send for Output {}
|
||||
unsafe impl Sync for Output {}
|
||||
|
||||
impl Output {
|
||||
pub unsafe fn wrap(ptr: *mut AVOutputFormat) -> Self {
|
||||
|
||||
Reference in New Issue
Block a user