format/context: close AVIOContext before freeing AVFormatContext
This commit is contained in:
parent
ef11b2bec4
commit
b67e4eb6d9
@ -27,8 +27,10 @@ impl Drop for Destructor {
|
|||||||
Mode::Input =>
|
Mode::Input =>
|
||||||
avformat_close_input(&mut self.ptr),
|
avformat_close_input(&mut self.ptr),
|
||||||
|
|
||||||
Mode::Output =>
|
Mode::Output => {
|
||||||
avformat_free_context(self.ptr),
|
avio_close((*self.ptr).pb);
|
||||||
|
avformat_free_context(self.ptr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user