decoder/dsdiff: fix byte order bug
This commit is contained in:

committed by
Max Kellermann

parent
573ff3a24f
commit
47d3758820
@@ -47,6 +47,17 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class DffDsdUint64 {
|
||||
uint32_t hi;
|
||||
uint32_t lo;
|
||||
|
||||
public:
|
||||
constexpr uint64_t Read() const {
|
||||
return (uint64_t(FromBE32(hi)) << 32) |
|
||||
uint64_t(FromBE32(lo));
|
||||
}
|
||||
};
|
||||
|
||||
bool
|
||||
dsdlib_read(Decoder *decoder, InputStream &is,
|
||||
void *data, size_t length);
|
||||
|
@@ -43,13 +43,13 @@
|
||||
|
||||
struct DsdiffHeader {
|
||||
DsdId id;
|
||||
DsdUint64 size;
|
||||
DffDsdUint64 size;
|
||||
DsdId format;
|
||||
};
|
||||
|
||||
struct DsdiffChunkHeader {
|
||||
DsdId id;
|
||||
DsdUint64 size;
|
||||
DffDsdUint64 size;
|
||||
|
||||
/**
|
||||
* Read the "size" attribute from the specified header, converting it
|
||||
|
Reference in New Issue
Block a user