Clone timeline to prevent modification during iteration

Fixes #65
This commit is contained in:
Daniel Wolf 2019-02-10 20:18:47 +01:00
parent 5c428793c9
commit 6c62318816
2 changed files with 5 additions and 1 deletions

View File

@ -1,5 +1,9 @@
# Version history
## Unreleased
* **Fixed** segmentation fault on OS X ([issue #65](https://github.com/DanielSWolf/rhubarb-lip-sync/issues/65)).
## Version 1.9.0
* **Added** basic support for non-English recordings through phonetic recognition ([issue #45](https://github.com/DanielSWolf/rhubarb-lip-sync/issues/45)).

View File

@ -77,7 +77,7 @@ JoiningBoundedTimeline<void> detectVoiceActivity(
// Discard very short segments of activity
const centiseconds minSegmentLength(5);
for (const auto& segment : activity) {
for (const auto& segment : Timeline<void>(activity)) {
if (segment.getDuration() < minSegmentLength) {
activity.clear(segment.getTimeRange());
}