Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2014-03-16 23:11:24 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2014-03-16 23:22:13 +0400
commit930765faa81efe3894e5476a59f5f3298da54ae4 (patch)
tree665af78bc83521764e1b9bde50f40373a457574e /source
parentd08e6ab27973d7762d47126347c67012c8526035 (diff)
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...
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/sequencer.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c
index 86cf04eded8..17c523efb15 100644
--- a/source/blender/blenkernel/intern/sequencer.c
+++ b/source/blender/blenkernel/intern/sequencer.c
@@ -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 */
}