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
Notes: blender-bot 2024-03-22 15:57:27 +01:00
Referenced by commit 7d44184c85, Fix T65094: Sequencer crashes blender when scene strip has NULL scene
Referenced by issue #39247, 2.70 CUDA Error: Not found in cuModuleGetTextRef(&texref,cuModule, name)
Referenced by issue #39227, Multi-Number Button Editing doesn't work on Y value of the objects Dimensions on the Transform Properties Panel
Referenced by issue #39227, Multi-Number Button Editing doesn't work on Y value of the objects Dimensions on the Transform Properties Panel
Referenced by issue #39208, Adding scene to another scene's VSE causes audio and video to be unsynchronized
1 changed files with 11 additions and 1 deletions

View File

@ -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 */
}