Merge pull request #66 from DanielSWolf/bugfix/#65-modification-during-iteration

Clone timeline to prevent modification during iteration
This commit is contained in:
Daniel Wolf 2019-02-10 20:29:29 +01:00 committed by GitHub
commit f3b9017a2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -1,5 +1,9 @@
# Version history # Version history
## Unreleased
* **Fixed** segmentation fault on OS X ([issue #65](https://github.com/DanielSWolf/rhubarb-lip-sync/issues/65)).
## Version 1.9.0 ## 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)). * **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 // Discard very short segments of activity
const centiseconds minSegmentLength(5); const centiseconds minSegmentLength(5);
for (const auto& segment : activity) { for (const auto& segment : Timeline<void>(activity)) {
if (segment.getDuration() < minSegmentLength) { if (segment.getDuration() < minSegmentLength) {
activity.clear(segment.getTimeRange()); activity.clear(segment.getTimeRange());
} }