Browse Source

image-source: Transition when restarting slideshow

Fixes an issue where it would instantly set the image rather than
transition to the first from its current value
jp9000 5 years ago
parent
commit
37767b6746
1 changed files with 2 additions and 4 deletions
  1. 2 4
      plugins/image-source/obs-slideshow.c

+ 2 - 4
plugins/image-source/obs-slideshow.c

@@ -509,12 +509,10 @@ static void ss_restart(void *data)
 
 
 	ss->elapsed = 0.0f;
 	ss->elapsed = 0.0f;
 	ss->cur_item = 0;
 	ss->cur_item = 0;
-
-	obs_transition_set(ss->transition,
-			   ss->files.array[ss->cur_item].source);
-
 	ss->stop = false;
 	ss->stop = false;
 	ss->paused = false;
 	ss->paused = false;
+	do_transition(ss, false);
+
 	set_media_state(ss, OBS_MEDIA_STATE_PLAYING);
 	set_media_state(ss, OBS_MEDIA_STATE_PLAYING);
 }
 }