Sfoglia il codice sorgente

deps/media-playback: Check `is_active` when frame preloading

Adds a check to make sure that delayed preload is ignored if the stinger
is restarted/interrupted. Just adds this check to the previous commit to
make sure that it doesn't redundantly try to preload a frame when
playback is restarted.
Lain 2 anni fa
parent
commit
40ce466f4d
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      deps/media-playback/media-playback/media.c

+ 1 - 1
deps/media-playback/media-playback/media.c

@@ -850,7 +850,7 @@ static inline bool mp_media_thread(mp_media_t *m)
 
 		/* see note in mp_media_prepare_frames() for context on the
 		 * pointer check */
-		if (preload_frame && m->obsframe.data[0]) {
+		if (preload_frame && m->obsframe.data[0] && !is_active) {
 			m->v_preload_cb(m->opaque, &m->obsframe);
 		}