diff --git a/src/filter_realcugan.cpp b/src/filter_realcugan.cpp index 95be9d0..37efd7e 100644 --- a/src/filter_realcugan.cpp +++ b/src/filter_realcugan.cpp @@ -32,10 +32,7 @@ FilterRealcugan::FilterRealcugan( model_name_(std::move(model_name)) {} FilterRealcugan::~FilterRealcugan() { - if (realcugan_) { - delete realcugan_; - realcugan_ = nullptr; - } + delete realcugan_; } int FilterRealcugan::init(AVCodecContext* dec_ctx, AVCodecContext* enc_ctx, AVBufferRef*) { diff --git a/src/filter_realesrgan.cpp b/src/filter_realesrgan.cpp index 0101b2e..9b5ce7f 100644 --- a/src/filter_realesrgan.cpp +++ b/src/filter_realesrgan.cpp @@ -26,10 +26,7 @@ FilterRealesrgan::FilterRealesrgan( model_name_(std::move(model_name)) {} FilterRealesrgan::~FilterRealesrgan() { - if (realesrgan_) { - delete realesrgan_; - realesrgan_ = nullptr; - } + delete realesrgan_; } int FilterRealesrgan::init(AVCodecContext* dec_ctx, AVCodecContext* enc_ctx, AVBufferRef*) { diff --git a/src/interpolator_rife.cpp b/src/interpolator_rife.cpp index 34b1708..08ac3c4 100644 --- a/src/interpolator_rife.cpp +++ b/src/interpolator_rife.cpp @@ -29,10 +29,7 @@ InterpolatorRIFE::InterpolatorRIFE( model_name_(std::move(model_name)) {} InterpolatorRIFE::~InterpolatorRIFE() { - if (rife_) { - delete rife_; - rife_ = nullptr; - } + delete rife_; } int InterpolatorRIFE::init(AVCodecContext* dec_ctx, AVCodecContext* enc_ctx, AVBufferRef*) {