[Bf-blender-cvs] [930765f] master: Fix T39208: Adding scene to another scene's VSE causes audio and video to be unsynchronized

Bastien Montagne noreply at git.blender.org
Sun Mar 16 20:24:15 CET 2014


Commit: 930765faa81efe3894e5476a59f5f3298da54ae4
Author: Bastien Montagne
Date:   Sun Mar 16 20:11:24 2014 +0100
https://developer.blender.org/rB930765faa81efe3894e5476a59f5f3298da54ae4

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...

===================================================================

M	source/blender/blenkernel/intern/sequencer.c

===================================================================

diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c
index 86cf04e..17c523e 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 */
 }




More information about the Bf-blender-cvs mailing list