Commit 46d3a4c6 authored by Erik de Castro Lopo's avatar Erik de Castro Lopo
Browse files

Couple of minor tweaks

Patch-from: lvqcl <lvqcl.mail@gmail.com>
parent a7583650
......@@ -52,7 +52,7 @@
# ifndef SIZE_T_MAX
# ifdef _MSC_VER
# ifdef _WIN64
# define SIZE_T_MAX 0xffffffffffffffffui64
# define SIZE_T_MAX FLAC__U64L(0xffffffffffffffff)
# else
# define SIZE_T_MAX 0xffffffff
# endif
......
......@@ -198,7 +198,7 @@ static FLAC__bool read_from_wave_(foreign_metadata_t *fm, FILE *f, const char **
}
if(!append_block_(fm, offset, 12, error))
return false;
if(!fm->is_rf64 || unpack32le_(buffer+4) != 0xffffffffu) {
if(!fm->is_rf64 || unpack32le_(buffer+4) != 0xffffffff) {
eof_offset = (FLAC__off_t)8 + (FLAC__off_t)unpack32le_(buffer+4);
if(eof_offset & 1) /* fix odd RIFF size */
eof_offset++;
......@@ -293,7 +293,7 @@ static FLAC__bool read_from_wave_(foreign_metadata_t *fm, FILE *f, const char **
}
}
else { /* skip to next chunk */
if(fm->is_rf64 && !memcmp(buffer, "data", 4) && unpack32le_(buffer+4) == 0xffffffffu) {
if(fm->is_rf64 && !memcmp(buffer, "data", 4) && unpack32le_(buffer+4) == 0xffffffff) {
if(fseeko(f, ds64_data_size, SEEK_CUR) < 0) {
if(error) *error = "invalid RF64 file: seek error (r10)";
return false;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment