Merge branch 'v0.19.x'
This commit is contained in:
commit
557bee61d5
3
NEWS
3
NEWS
@ -29,6 +29,9 @@ ver 0.20 (not yet released)
|
|||||||
- proxy: add TCP keepalive option
|
- proxy: add TCP keepalive option
|
||||||
|
|
||||||
ver 0.19.9 (not yet released)
|
ver 0.19.9 (not yet released)
|
||||||
|
* decoder
|
||||||
|
- dsdiff, dsf: raise ID3 tag limit to 1 MB
|
||||||
|
* fix clock integer overflow on OS X
|
||||||
* fix build failure with uClibc
|
* fix build failure with uClibc
|
||||||
* fix build failure on non-POSIX operating systems
|
* fix build failure on non-POSIX operating systems
|
||||||
|
|
||||||
|
@ -334,7 +334,7 @@ UpdateWalk::UpdateDirectory(Directory &directory, const FileInfo &info)
|
|||||||
directory_set_stat(directory, info);
|
directory_set_stat(directory, info);
|
||||||
|
|
||||||
Error error;
|
Error error;
|
||||||
const std::auto_ptr<StorageDirectoryReader> reader(storage.OpenDirectory(directory.GetPath(), error));
|
const std::unique_ptr<StorageDirectoryReader> reader(storage.OpenDirectory(directory.GetPath(), error));
|
||||||
if (reader.get() == nullptr) {
|
if (reader.get() == nullptr) {
|
||||||
LogError(error);
|
LogError(error);
|
||||||
return false;
|
return false;
|
||||||
|
@ -125,27 +125,26 @@ dsdlib_tag_id3(InputStream &is,
|
|||||||
|
|
||||||
const id3_length_t count = size - offset;
|
const id3_length_t count = size - offset;
|
||||||
|
|
||||||
if (count < 10 || count > 256*1024)
|
if (count < 10 || count > 1024 * 1024)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
id3_byte_t *const id3_buf = static_cast<id3_byte_t*>(xalloc(count));
|
id3_byte_t *const id3_buf = new id3_byte_t[count];
|
||||||
|
if (id3_buf == nullptr)
|
||||||
|
return;
|
||||||
|
|
||||||
if (!decoder_read_full(nullptr, is, id3_buf, count)) {
|
if (!decoder_read_full(nullptr, is, id3_buf, count)) {
|
||||||
free(id3_buf);
|
delete[] id3_buf;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct id3_tag *id3_tag = id3_tag_parse(id3_buf, count);
|
struct id3_tag *id3_tag = id3_tag_parse(id3_buf, count);
|
||||||
if (id3_tag == nullptr) {
|
delete[] id3_buf;
|
||||||
free(id3_buf);
|
if (id3_tag == nullptr)
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
scan_id3_tag(id3_tag, handler, handler_ctx);
|
scan_id3_tag(id3_tag, handler, handler_ctx);
|
||||||
|
|
||||||
id3_tag_delete(id3_tag);
|
id3_tag_delete(id3_tag);
|
||||||
|
|
||||||
free(id3_buf);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -40,8 +40,8 @@ MonotonicClockS(void)
|
|||||||
if (base.denom == 0)
|
if (base.denom == 0)
|
||||||
(void)mach_timebase_info(&base);
|
(void)mach_timebase_info(&base);
|
||||||
|
|
||||||
return (unsigned)((mach_absolute_time() * base.numer / 1000)
|
return (unsigned)(((double)mach_absolute_time() * base.numer / 1000)
|
||||||
/ (1000000 * base.denom));
|
/ base.denom / 1000000);
|
||||||
#elif defined(CLOCK_MONOTONIC)
|
#elif defined(CLOCK_MONOTONIC)
|
||||||
struct timespec ts;
|
struct timespec ts;
|
||||||
clock_gettime(CLOCK_MONOTONIC, &ts);
|
clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||||
@ -62,8 +62,8 @@ MonotonicClockMS(void)
|
|||||||
if (base.denom == 0)
|
if (base.denom == 0)
|
||||||
(void)mach_timebase_info(&base);
|
(void)mach_timebase_info(&base);
|
||||||
|
|
||||||
return (unsigned)((mach_absolute_time() * base.numer)
|
return (unsigned)(((double)mach_absolute_time() * base.numer)
|
||||||
/ (1000000 * base.denom));
|
/ base.denom / 1000000);
|
||||||
#elif defined(CLOCK_MONOTONIC)
|
#elif defined(CLOCK_MONOTONIC)
|
||||||
struct timespec ts;
|
struct timespec ts;
|
||||||
clock_gettime(CLOCK_MONOTONIC, &ts);
|
clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||||
@ -104,8 +104,8 @@ MonotonicClockUS(void)
|
|||||||
if (base.denom == 0)
|
if (base.denom == 0)
|
||||||
(void)mach_timebase_info(&base);
|
(void)mach_timebase_info(&base);
|
||||||
|
|
||||||
return ((uint64_t)mach_absolute_time() * (uint64_t)base.numer)
|
return (uint64_t)(((double)mach_absolute_time() * base.numer)
|
||||||
/ (1000 * (uint64_t)base.denom);
|
/ base.denom / 1000);
|
||||||
#elif defined(CLOCK_MONOTONIC)
|
#elif defined(CLOCK_MONOTONIC)
|
||||||
struct timespec ts;
|
struct timespec ts;
|
||||||
clock_gettime(CLOCK_MONOTONIC, &ts);
|
clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||||
|
Loading…
Reference in New Issue
Block a user