[Bf-blender-cvs] [27fa4d3] gooseberry: Scrubbing after movie has finished playing works now

Antony Riakiotakis noreply at git.blender.org
Mon May 18 19:13:56 CEST 2015


Commit: 27fa4d33012637ec95e3b7de1cb2760b70aa6fa9
Author: Antony Riakiotakis
Date:   Mon May 18 19:13:35 2015 +0200
Branches: gooseberry
https://developer.blender.org/rB27fa4d33012637ec95e3b7de1cb2760b70aa6fa9

Scrubbing after movie has finished playing works now

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

M	source/blender/windowmanager/intern/wm_playanim.c

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

diff --git a/source/blender/windowmanager/intern/wm_playanim.c b/source/blender/windowmanager/intern/wm_playanim.c
index 430faa6..1aea27b 100644
--- a/source/blender/windowmanager/intern/wm_playanim.c
+++ b/source/blender/windowmanager/intern/wm_playanim.c
@@ -501,8 +501,18 @@ static void change_frame(PlayState *ps, int cx)
 		ps->picture = ps->picture->next;
 	}
 	i = (i * cx) / sizex;
+
 	if (playback_handle) {
-		AUD_seek(playback_handle, i / fps_movie);
+		AUD_Status status = AUD_getStatus(playback_handle);
+		if (status != AUD_STATUS_PLAYING) {
+			AUD_stop(playback_handle);
+			playback_handle = AUD_play(source, 1);
+			if (playback_handle)
+				AUD_seek(playback_handle, i / fps_movie);
+		}
+		else {
+			AUD_seek(playback_handle, i / fps_movie);
+		}
 	}
 	ps->picture = picsbase.first;
 	for (; i > 0; i--) {




More information about the Bf-blender-cvs mailing list