Fix #110333: Sound strip length not correct when opening old file
Commit `c9be925f7d` fixed files for studio, that were saved in incorrect state. This also attempted to fix unaffected files. In affected files `seq->startofs` did overflow. Sound strips are not expected to have negative `startofs` and therefore fix in `c9be925f7d` can be limited to broken files by checking `startofs` value.
This commit is contained in:
@@ -1764,7 +1764,12 @@ static bool version_seq_fix_broken_sound_strips(Sequence *seq, void * /*user_dat
|
||||
|
||||
seq->speed_factor = 1.0f;
|
||||
SEQ_retiming_data_clear(seq);
|
||||
seq->startofs = 0.0f;
|
||||
|
||||
/* Broken files do have negative start offset, which should not be present in sound strips. */
|
||||
if (seq->startofs < 0) {
|
||||
seq->startofs = 0.0f;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user