Fixing [#28907] Frozen playback.

Also fixing two more crashes when audio files don't exist/cannot be read and apply a changed file path of a sound, reported by Jens Verwiebe in IRC.
This commit is contained in:
2011-10-13 22:19:29 +00:00
parent d893ac690c
commit 9e17ecf010
5 changed files with 25 additions and 12 deletions

View File

@@ -1790,11 +1790,14 @@ void wm_event_do_handlers(bContext *C)
}
if(playing == 0) {
int ncfra = sound_sync_scene(scene) * (float)FPS + 0.5f;
if(ncfra != scene->r.cfra) {
scene->r.cfra = ncfra;
ED_update_for_newframe(CTX_data_main(C), scene, win->screen, 1);
WM_event_add_notifier(C, NC_WINDOW, NULL);
float time = sound_sync_scene(scene);
if(finite(time)) {
int ncfra = sound_sync_scene(scene) * (float)FPS + 0.5f;
if(ncfra != scene->r.cfra) {
scene->r.cfra = ncfra;
ED_update_for_newframe(CTX_data_main(C), scene, win->screen, 1);
WM_event_add_notifier(C, NC_WINDOW, NULL);
}
}
}