mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-12 01:30:49 +01:00
Minor tweaks
This commit is contained in:
parent
3f45b62117
commit
a3296cd274
@ -99,6 +99,7 @@ void reset_ogg_vorbis(VGMSTREAM *vgmstream) {
|
||||
ogg_vorbis_codec_data *data = vgmstream->codec_data;
|
||||
if (!data) return;
|
||||
|
||||
/* this seek cleans internal buffers */
|
||||
ov_pcm_seek(&data->ogg_vorbis_file, 0);
|
||||
}
|
||||
|
||||
@ -106,6 +107,8 @@ void seek_ogg_vorbis(VGMSTREAM *vgmstream, int32_t num_sample) {
|
||||
ogg_vorbis_codec_data *data = vgmstream->codec_data;
|
||||
if (!data) return;
|
||||
|
||||
/* this seek crosslaps to avoid possible clicks, so seeking to 0 will
|
||||
* decode a bit differently than ov_pcm_seek */
|
||||
ov_pcm_seek_lap(&data->ogg_vorbis_file, num_sample);
|
||||
}
|
||||
|
||||
|
@ -890,7 +890,7 @@ size_t read_string(char * buf, size_t maxsize, off_t offset, STREAMFILE *streamF
|
||||
if (buf) buf[pos] = '\0';
|
||||
return maxsize;
|
||||
}
|
||||
if (c < 0x20 || c > 0xA5)
|
||||
if (c < 0x20 || (uint8_t)c > 0xA5)
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user