reset to nil

This commit is contained in:
lizzie
2026-09-03 06:55:12 +00:00
parent d8b3a57322
commit 234086ba8d
2 changed files with 6 additions and 2 deletions
@@ -34,8 +34,10 @@ Result OpusDecodeObject::InitializeDecoder(u32 sample_rate, u32 channel_count) {
}
Result OpusDecodeObject::Shutdown() {
if (avctx)
if (avctx) {
avcodec_free_context(&avctx);
avctx = nullptr;
}
return ResultSuccess;
}
@@ -44,8 +44,10 @@ Result OpusMultiStreamDecodeObject::InitializeDecoder(u32 sample_rate, u32 total
}
Result OpusMultiStreamDecodeObject::Shutdown() {
if (avctx)
if (avctx) {
avcodec_free_context(&avctx);
avctx = nullptr;
}
return ResultSuccess;
}