diff options
author | Ellen Poe <ellen@ellenhp.me> | 2021-12-10 18:09:58 -0800 |
---|---|---|
committer | Ellen Poe <ellen@ellenhp.me> | 2021-12-10 18:09:58 -0800 |
commit | fe51c099c1a0995b6392d48e42844cfe4b0138b6 (patch) | |
tree | 0eb6d595d27377a5d65db9e77b981635526ff0d6 /modules/vorbis/audio_stream_ogg_vorbis.cpp | |
parent | e69fa16eb3cd4cf4a591eb4c533b9eff45f79850 (diff) |
Fix OGG streams never ending playback
Diffstat (limited to 'modules/vorbis/audio_stream_ogg_vorbis.cpp')
-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) { |