diff options
author | John Emmas <johne53@tiscali.co.uk> | 2015-09-18 10:44:07 +0100 |
---|---|---|
committer | John Emmas <johne53@tiscali.co.uk> | 2015-09-18 10:44:07 +0100 |
commit | c12e8cc47c8f3dcc6508a4e0734818c2a4fc38f1 (patch) | |
tree | 250e399acde2785f703862c498d41896abc4af01 /libs/ardour/strip_silence.cc | |
parent | b548b6213d064b86f0748aa62595400d0e6fff91 (diff) |
Modify Strip Silence so that it can't create regions with -ve lengths
AFAICT this could happen if a region's end time (on the timeline) was earlier than the end time in the actual recording. This could cause a situation where the last block of detected silence would have an end time greater than the end tome for the region being processed. Strip Silence would create its new regions - but the last one it created would usually come out with a negative duration.
Diffstat (limited to 'libs/ardour/strip_silence.cc')
-rw-r--r-- | libs/ardour/strip_silence.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/ardour/strip_silence.cc b/libs/ardour/strip_silence.cc index 3839b984bd..2151a3c232 100644 --- a/libs/ardour/strip_silence.cc +++ b/libs/ardour/strip_silence.cc @@ -100,7 +100,7 @@ StripSilence::run (boost::shared_ptr<Region> r, Progress* progress) frameoffset_t const end_of_region = r->start() + r->length(); - if (last_silence->second != end_of_region - 1) { + if (last_silence->second < end_of_region - 1) { audible.push_back (std::make_pair (last_silence->second, end_of_region - 1)); } |