renderer: improve thread safety

Since we share render backends between the viewer and cache tasks now, we
should ensure the render backend is thread safe.
This commit is contained in:
itsmattkc
2020-07-07 13:16:25 +10:00
parent a45f514f68
commit 919314cce8
6 changed files with 17 additions and 19 deletions
+8 -8
View File
@@ -64,17 +64,17 @@ bool ExportTask::Run()
frame_time_ = Timecode::time_to_timestamp(range.in(), viewer()->video_params().time_base());
QMatrix4x4 mat;
if (params_.video_enabled()) {
// If a transformation matrix is applied to this video, create it here
if (params_.video_scaling_method() != ExportParams::kStretch) {
mat = ExportParams::GenerateMatrix(params_.video_scaling_method(),
viewer()->video_params().width(),
viewer()->video_params().height(),
params_.video_params().width(),
params_.video_params().height());
QMatrix4x4 mat = ExportParams::GenerateMatrix(params_.video_scaling_method(),
viewer()->video_params().width(),
viewer()->video_params().height(),
params_.video_params().width(),
params_.video_params().height());
backend()->SetVideoDownloadMatrix(mat);
}
// Create color processor
@@ -99,7 +99,7 @@ bool ExportTask::Run()
audio_data_.SetLength(range.length());
}
Render(video_range, audio_range, mat, false);
Render(video_range, audio_range, false);
bool success = true;