mirror of
https://github.com/encounter/rust-ffmpeg.git
synced 2026-07-10 21:18:39 -07:00
format/context: close AVIOContext before freeing AVFormatContext
This commit is contained in:
@@ -27,8 +27,10 @@ impl Drop for Destructor {
|
||||
Mode::Input =>
|
||||
avformat_close_input(&mut self.ptr),
|
||||
|
||||
Mode::Output =>
|
||||
avformat_free_context(self.ptr),
|
||||
Mode::Output => {
|
||||
avio_close((*self.ptr).pb);
|
||||
avformat_free_context(self.ptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user