13
0

TimeFx-Filter: do not create a region when operation is canceled

This commit is contained in:
Robin Gareus 2019-02-26 03:07:49 +01:00
parent c36dfbedb7
commit b8a6f7b052
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 7 additions and 3 deletions

View File

@ -340,7 +340,9 @@ RBEffect::run (boost::shared_ptr<Region> r, Progress* progress)
new_name += suffix;
ret = finish (region, nsrcs, new_name);
if (!tsr.cancel) {
ret = finish (region, nsrcs, new_name);
}
/* now reset ancestral data for each new region */
@ -360,7 +362,7 @@ RBEffect::run (boost::shared_ptr<Region> r, Progress* progress)
/* stretch region gain envelope */
/* XXX: assuming we've only processed one input region into one result here */
if (tsr.time_fraction != 1) {
if (ret == 0 && tsr.time_fraction != 1) {
result = boost::dynamic_pointer_cast<AudioRegion> (results.front());
assert (result);
result->envelope()->x_scale (tsr.time_fraction);

View File

@ -171,7 +171,9 @@ STStretch::run (boost::shared_ptr<Region> a_region, Progress* progress)
new_name += suffix;
ret = finish (region, nsrcs, new_name);
if (!tsr.cancel) {
ret = finish (region, nsrcs, new_name);
}
/* now reset ancestral data for each new region */