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.
This commit is contained in:
Lain
2023-05-25 18:09:46 -07:00
parent a12d5812af
commit 40ce466f4d

View File

@@ -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);
}