Fix build failure on 32-bit with taglib 2

This commit fixes: #7375.
This commit is contained in:
Boyuan Yang 2025-01-13 10:22:37 -05:00 committed by John Maguire
parent 658f34ec40
commit 41e2a07b3e

View File

@ -97,7 +97,7 @@ TagLib::ByteVector CloudStream::readBlock(size_t length) {
TagLib::ByteVector CloudStream::readBlock(ulong length) { TagLib::ByteVector CloudStream::readBlock(ulong length) {
#endif #endif
const uint start = cursor_; const uint start = cursor_;
const uint end = qMin(cursor_ + length - 1, length_ - 1); const uint end = qMin((size_t)(cursor_ + length - 1), (size_t)(length_ - 1));
if (end < start) { if (end < start) {
return TagLib::ByteVector(); return TagLib::ByteVector();
@ -187,7 +187,7 @@ void CloudStream::seek(long offset, TagLib::IOStream::Position p) {
case TagLib::IOStream::End: case TagLib::IOStream::End:
// This should really not have qAbs(), but OGG reading needs it. // This should really not have qAbs(), but OGG reading needs it.
cursor_ = qMax(0UL, length_ - qAbs(offset)); cursor_ = qMax(0UL, (unsigned long)(length_ - qAbs(offset)));
break; break;
} }
} }