mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-05-03 21:06:11 -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:
2
deps/media-playback/media-playback/cache.c
vendored
2
deps/media-playback/media-playback/cache.c
vendored
@@ -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