Skip to content
Permalink
Browse files
fix logic bug in ogg and opus loop code (bug #4904)
  • Loading branch information
sezero committed Dec 18, 2019
1 parent 9000cb9 commit d84d66be7dca455accd64ab6d9f6eb81e1dddccc
Showing with 2 additions and 2 deletions.
  1. +1 −1 src/codecs/music_ogg.c
  2. +1 −1 src/codecs/music_opus.c
@@ -336,7 +336,7 @@ static void *OGG_CreateFromRW(SDL_RWops *src, int freesrc)

full_length = vorbis.ov_pcm_total(&music->vf, -1);
if (((music->loop_start >= 0) || (music->loop_end > 0)) &&
((music->loop_start < music->loop_end) || (music->loop_end == 0)) &&
((music->loop_start < music->loop_end) || (music->loop_end > 0)) &&
(music->loop_start < full_length) &&
(music->loop_end <= full_length)) {
if (music->loop_start < 0) music->loop_start = 0;
@@ -332,7 +332,7 @@ static void *OPUS_CreateFromRW(SDL_RWops *src, int freesrc)

full_length = opus.op_pcm_total(music->of, -1);
if (((music->loop_start >= 0) || (music->loop_end > 0)) &&
((music->loop_start < music->loop_end) || (music->loop_end == 0)) &&
((music->loop_start < music->loop_end) || (music->loop_end > 0)) &&
(music->loop_start < full_length) &&
(music->loop_end <= full_length)) {
if (music->loop_start < 0) music->loop_start = 0;

0 comments on commit d84d66b

Please sign in to comment.