[Bf-blender-cvs] [6ac07b21518] temp-lanpr-cleanup: Fix T69355: Closing window stops video but not audio

Campbell Barton noreply at git.blender.org
Wed Sep 25 03:48:41 CEST 2019


Commit: 6ac07b215184fb3c7fe47fd4eb01d02bd04dd4bf
Author: Campbell Barton
Date:   Fri Sep 20 16:37:07 2019 +1000
Branches: temp-lanpr-cleanup
https://developer.blender.org/rB6ac07b215184fb3c7fe47fd4eb01d02bd04dd4bf

Fix T69355: Closing window stops video but not audio

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

M	source/blender/editors/screen/screen_edit.c

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

diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c
index 6b3fbb79cb4..815940864ac 100644
--- a/source/blender/editors/screen/screen_edit.c
+++ b/source/blender/editors/screen/screen_edit.c
@@ -44,6 +44,7 @@
 #include "BKE_node.h"
 #include "BKE_screen.h"
 #include "BKE_scene.h"
+#include "BKE_sound.h"
 #include "BKE_workspace.h"
 
 #include "WM_api.h"
@@ -583,6 +584,11 @@ void ED_screen_exit(bContext *C, wmWindow *window, bScreen *screen)
 
   if (screen->animtimer) {
     WM_event_remove_timer(wm, window, screen->animtimer);
+
+    Depsgraph *depsgraph = CTX_data_depsgraph_pointer(C);
+    Scene *scene = WM_window_get_active_scene(prevwin);
+    Scene *scene_eval = (Scene *)DEG_get_evaluated_id(depsgraph, &scene->id);
+    BKE_sound_stop_scene(scene_eval);
   }
   screen->animtimer = NULL;
   screen->scrubbing = false;



More information about the Bf-blender-cvs mailing list