From 5b85b4e8377aea1e695a10a0480cb12e73998a47 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Tue, 22 Feb 2022 06:45:20 +0800 Subject: [PATCH] End music playback on critical error, ryzom/ryzomcore#661 --- nel/src/sound/audio_decoder_vorbis.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nel/src/sound/audio_decoder_vorbis.cpp b/nel/src/sound/audio_decoder_vorbis.cpp index 45a8da7f6..006becd41 100644 --- a/nel/src/sound/audio_decoder_vorbis.cpp +++ b/nel/src/sound/audio_decoder_vorbis.cpp @@ -180,13 +180,17 @@ uint32 CAudioDecoderVorbis::getNextBytes(uint8 *buffer, uint32 minimum, uint32 m nlwarning("ov_read returned OV_HOLE"); break; case OV_EINVAL: + _IsMusicEnded = true; nlwarning("ov_read returned OV_EINVAL"); break; case OV_EBADLINK: + _IsMusicEnded = true; nlwarning("ov_read returned OV_EBADLINK"); break; default: + _IsMusicEnded = true; nlwarning("ov_read returned %d", br); + break; } } } while (bytes_read < minimum);