fix: manually free demuxer io

This commit is contained in:
kieran 2025-01-27 22:26:03 +00:00
parent b8d45e8289
commit 128f204253
No known key found for this signature in database
GPG Key ID: DE71CEB3925BE941

View File

@ -253,6 +253,8 @@ impl Drop for Demuxer {
if let DemuxerInput::Reader(_, _) = self.input {
av_free((*(*self.ctx).pb).buffer as *mut _);
drop(SlimBox::<dyn Read>::from_raw((*(*self.ctx).pb).opaque));
}
if !(*self.ctx).pb.is_null() {
avio_context_free(&mut (*self.ctx).pb);
}
avformat_free_context(self.ctx);