format/context: close AVIOContext before freeing AVFormatContext

This commit is contained in:
Tadas Barzdžius 2017-04-27 18:58:37 +03:00 committed by meh
parent ef11b2bec4
commit b67e4eb6d9

View File

@ -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);
}
} }
} }
} }