Skip to content

Commit

Permalink
Do not use MIN/MAX for portability reasons
Browse files Browse the repository at this point in the history
* Does not work on windows so well
  • Loading branch information
8W9aG committed Dec 5, 2017
1 parent 3ef0b16 commit 28b8183
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/vorbisfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -1913,7 +1913,9 @@ vorbis_comment *ov_comment(OggVorbis_File *vf,int link){
}

void ov_set_read_size(OggVorbis_File *vf,int read_size) {
vf->read_size = MAX(1, MIN(read_size, CHUNKSIZE));
read_size = read_size > CHUNKSIZE ? CHUNKSIZE : read_size;
read_size = read_size < 1 ? 1 : read_size;
vf->read_size = read_size;
}

int ov_get_read_size(OggVorbis_File *vf) {
Expand Down

0 comments on commit 28b8183

Please sign in to comment.