mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-10-03 02:48:40 -04:00
deps/media-playback: Fix preloaded videos stopping prematurely
The incorrect variable was used in a comparison, causing playback to stop prematurely depending on whether the audio data or video data ended first. Closes obs-project/obs-studio#8422
This commit is contained in:
1 parent
39afa665a1
commit
35f037da47
1 file changed
+1
-1
+1
-1
@@ -262,7 +262,7 @@ static void mp_cache_next_video(mp_cache_t *c, bool preload)
|
||||
static void mp_cache_next_audio(mp_cache_t *c)
|
||||
{
|
||||
/* eof check */
|
||||
if (c->next_a_idx == c->video_frames.num) {
|
||||
if (c->next_a_idx == c->audio_segments.num) {
|
||||
if (mp_media_can_play_audio(c))
|
||||
c->cur_a_idx = c->next_a_idx;
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user