diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-12-11 08:54:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-11 08:54:45 +0100 |
commit | 092a2861277e7df87aec10516d713d0bf4adba79 (patch) | |
tree | 38d07aceb68e2f56d5c9083b74a1bbcd4200ab2e /modules/vorbis | |
parent | f1ca14cc8daf7529569a11c9209c18f8f73e837a (diff) | |
parent | fe51c099c1a0995b6392d48e42844cfe4b0138b6 (diff) |
Merge pull request #55808 from ellenhp/fix_ogg_is_playing
Fix OGG streams never ending playback
Diffstat (limited to 'modules/vorbis')
-rw-r--r-- | modules/vorbis/audio_stream_ogg_vorbis.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/vorbis/audio_stream_ogg_vorbis.cpp b/modules/vorbis/audio_stream_ogg_vorbis.cpp index d913c115d9..06ed021a5a 100644 --- a/modules/vorbis/audio_stream_ogg_vorbis.cpp +++ b/modules/vorbis/audio_stream_ogg_vorbis.cpp @@ -56,7 +56,7 @@ int AudioStreamPlaybackOGGVorbis::_mix_internal(AudioFrame *p_buffer, int p_fram todo -= mixed; frames_mixed += mixed; start_buffer += mixed; - if (!have_packets_left) { + if (!have_packets_left && !have_samples_left) { //end of file! bool is_not_empty = mixed > 0 || vorbis_stream->get_length() > 0; if (vorbis_stream->loop && is_not_empty) { |