Fix T39208: Adding scene to another scene's VSE causes audio and video to be unsynchronized

Audio of 'linked' scene has to be offset by the startframe of that scene, else it behaves as if 'linked' scene always started at frame 1...
This commit is contained in:
Bastien Montagne 2014-03-16 20:11:24 +01:00
parent d08e6ab279
commit 930765faa8

@ -3837,7 +3837,17 @@ void BKE_sequencer_update_sound_bounds_all(Scene *scene)
void BKE_sequencer_update_sound_bounds(Scene *scene, Sequence *seq)
{
sound_move_scene_sound_defaults(scene, seq);
if (seq->type == SEQ_TYPE_SCENE) {
if (seq->scene_sound) {
/* We have to take into account start frame of the sequence's scene! */
int startofs = seq->startofs + seq->anim_startofs + seq->scene->r.sfra;
sound_move_scene_sound(scene, seq->scene_sound, seq->startdisp, seq->enddisp, startofs);
}
}
else {
sound_move_scene_sound_defaults(scene, seq);
}
/* mute is set in seq_update_muting_recursive */
}