X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=resample_effect.h;h=5906a3c44ca41f499b17340e3fcc36fdaec80dfc;hp=1aa459cbaaa3926c1aeabe2cd8f4647d77fd5f29;hb=1c44926155efb721da02916f82af87d186a7fb57;hpb=b1b5194238dd8b357148a3eee48d8d3a1ad04b35 diff --git a/resample_effect.h b/resample_effect.h index 1aa459c..5906a3c 100644 --- a/resample_effect.h +++ b/resample_effect.h @@ -49,6 +49,7 @@ ScalingWeights calculate_scaling_weights(unsigned src_size, unsigned dst_size, f class ResampleEffect : public Effect { public: ResampleEffect(); + ~ResampleEffect(); virtual std::string effect_type_id() const { return "ResampleEffect"; } @@ -73,6 +74,9 @@ private: void update_size(); void update_offset_and_zoom(); + // 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; int input_width, input_height, output_width, output_height; @@ -83,7 +87,7 @@ private: class SingleResamplePassEffect : public Effect { public: - // If parent is non-NULL, calls to inform_input_size will be forwarded, + // If parent is non-nullptr, calls to inform_input_size will be forwarded, // so that it can inform both passes about the right input and output // resolutions. SingleResamplePassEffect(ResampleEffect *parent); @@ -98,7 +102,7 @@ public: virtual void inform_added(EffectChain *chain) { this->chain = chain; } virtual void inform_input_size(unsigned input_num, unsigned width, unsigned height) { - if (parent != NULL) { + if (parent != nullptr) { parent->inform_input_size(input_num, width, height); } }