export: allow exporting subtitles to sidecar files

This commit is contained in:
itsmattkc
2022-07-23 15:22:57 -07:00
parent 3948b77543
commit 12f9b1acfc
13 changed files with 183 additions and 39 deletions
+5 -2
View File
@@ -95,8 +95,7 @@ bool RenderTask::Render(ColorManager* manager,
// Subtitle loop, loops over all blocks in sequence on all tracks
if (!subtitle_range.length().isNull()) {
Sequence *sequence = dynamic_cast<Sequence*>(viewer_);
if (sequence) {
if (Sequence *sequence = dynamic_cast<Sequence*>(viewer_)) {
TrackList *list = sequence->track_list(Track::kSubtitle);
QVector<int> block_indexes(list->GetTrackCount(), 0);
@@ -106,6 +105,10 @@ bool RenderTask::Render(ColorManager* manager,
for (int i=0; i<block_indexes.size(); i++) {
Track *this_track = list->GetTrackAt(i);
if (this_track->IsMuted()) {
continue;
}
int &this_block_index = block_indexes[i];
if (this_block_index >= this_track->Blocks().size()) {
continue;