]> git.sesse.net Git - movit/blobdiff - resample_effect.h
In ResampleEffect, use std::unique_ptr instead of managing ownership ourselves.
[movit] / resample_effect.h
index 1822a3ea6b261fa833d59c4e4e2e0e276b83ca4b..027a497cc5fb5d6616ad43190117e4f91ed025d9 100644 (file)
@@ -93,8 +93,8 @@ private:
        
        // Both of these are owned by us if owns_effects is true (before finalize()),
        // and otherwise owned by the EffectChain.
-       bool owns_effects;
-       SingleResamplePassEffect *hpass, *vpass;
+       std::unique_ptr<SingleResamplePassEffect> hpass_owner, vpass_owner;
+       SingleResamplePassEffect *hpass = nullptr, *vpass = nullptr;
        int input_width, input_height, output_width, output_height;
 
        float offset_x, offset_y;