fix: free muxer context on reset
This commit is contained in:
parent
8e102423d4
commit
464ec32898
@ -355,6 +355,7 @@ impl Muxer {
|
|||||||
pub unsafe fn reset(&mut self) -> Result<()> {
|
pub unsafe fn reset(&mut self) -> Result<()> {
|
||||||
let ret = av_write_trailer(self.ctx);
|
let ret = av_write_trailer(self.ctx);
|
||||||
bail_ffmpeg!(ret);
|
bail_ffmpeg!(ret);
|
||||||
|
avformat_free_context(self.ctx);
|
||||||
self.ctx = ptr::null_mut();
|
self.ctx = ptr::null_mut();
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user