This commit is contained in:
itsmattkc
2020-02-17 13:06:09 +11:00
2 changed files with 6 additions and 7 deletions
-3
View File
@@ -8,9 +8,6 @@ if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
# FFmpeg 4.x
sudo add-apt-repository ppa:jonathonf/ffmpeg-4 -y
# OpenImageIO
sudo add-apt-repository ppa:olive-editor/openimageio -y
# OpenColorIO
sudo add-apt-repository ppa:olive-editor/opencolorio -y
+6 -4
View File
@@ -66,13 +66,15 @@ void AudioBackend::ThreadCompletedCache(NodeDependency dep, NodeValueTable data,
int out_point = offset + length;
QFile f(CachePathName());
if (f.open(QFile::WriteOnly | QFile::Append)) {
if (f.open(QFile::ReadWrite)) {
if (f.size() < out_point) {
f.resize(out_point);
if (f.size() < out_point && !f.resize(out_point)) {
qCritical() << "Failed to resize file" << CachePathName();
}
f.seek(offset);
if (!f.seek(offset)) {
qCritical() << "Failed to seek file" << CachePathName();
}
// Replace data with this data
int copy_length = qMin(length, cached_samples.size());