add test/data for video support : fix ci issue
This commit is contained in:
parent
d2fa07d559
commit
f5e731cd38
@ -217,7 +217,7 @@ void AsfVideo::readMetadata() {
|
||||
} // AsfVideo::readMetadata
|
||||
|
||||
AsfVideo::HeaderReader::HeaderReader(BasicIo::UniquePtr& io) : IdBuf_(GUID) {
|
||||
if (io->size() >= io->tell() + QWORD + QWORD) {
|
||||
if (io->size() >= io->tell() + GUID + QWORD) {
|
||||
IdBuf_ = io->read(GUID);
|
||||
|
||||
size_ = readQWORDTag(io);
|
||||
|
||||
@ -55,13 +55,13 @@ uint16_t readWORDTag(BasicIo::UniquePtr& io) {
|
||||
return FieldBuf.read_uint16(0, littleEndian);
|
||||
}
|
||||
|
||||
std::string readStringWcharTag(BasicIo::UniquePtr& io, uint16_t length) {
|
||||
std::string readStringWcharTag(BasicIo::UniquePtr& io, size_t length) {
|
||||
Internal::enforce(length <= io->size() - io->tell(), Exiv2::ErrorCode::kerCorruptedMetadata);
|
||||
DataBuf FieldBuf = io->read(length);
|
||||
return toString16(FieldBuf);
|
||||
}
|
||||
|
||||
std::string readStringTag(BasicIo::UniquePtr& io, uint16_t length) {
|
||||
std::string readStringTag(BasicIo::UniquePtr& io, size_t length) {
|
||||
Internal::enforce(length <= io->size() - io->tell(), Exiv2::ErrorCode::kerCorruptedMetadata);
|
||||
DataBuf FieldBuf = io->read(length);
|
||||
return Exiv2::toString(FieldBuf.data());
|
||||
|
||||
@ -54,9 +54,9 @@ std::string toString16(Exiv2::DataBuf& buf);
|
||||
|
||||
[[nodiscard]] uint16_t readWORDTag(Exiv2::BasicIo::UniquePtr& io);
|
||||
|
||||
[[nodiscard]] std::string readStringWcharTag(Exiv2::BasicIo::UniquePtr& io, uint16_t length);
|
||||
[[nodiscard]] std::string readStringWcharTag(Exiv2::BasicIo::UniquePtr& io, size_t length);
|
||||
|
||||
[[nodiscard]] std::string readStringTag(Exiv2::BasicIo::UniquePtr& io, uint16_t length = DWORD);
|
||||
[[nodiscard]] std::string readStringTag(Exiv2::BasicIo::UniquePtr& io, size_t length = DWORD);
|
||||
|
||||
} // namespace Exiv2
|
||||
#endif // HELPER_FUNCTIONS_HPP
|
||||
|
||||
@ -390,9 +390,7 @@ void RiffVideo::readMetadata() {
|
||||
|
||||
RiffVideo::HeaderReader::HeaderReader(BasicIo::UniquePtr& io) {
|
||||
if (io->size() >= io->tell() + DWORD + DWORD) {
|
||||
DataBuf IdBuf_ = io->read(DWORD);
|
||||
id_ = Exiv2::toString(IdBuf_.data());
|
||||
|
||||
id_ = readStringTag(io);
|
||||
size_ = readDWORDTag(io);
|
||||
}
|
||||
}
|
||||
@ -719,7 +717,7 @@ void RiffVideo::readIndexChunk(uint64_t size_) {
|
||||
|
||||
void RiffVideo::readDataChunk(uint64_t size_) {
|
||||
#ifdef EXIV2_DEBUG_MESSAGES
|
||||
EXV_DEBUG << "--> Data = " << readStringTag(size_) << std::endl;
|
||||
EXV_DEBUG << "--> Data = " << readStringTag(static_size<size_t>(size_)) << std::endl;
|
||||
if (size_ % 2 != 0) {
|
||||
EXV_DEBUG << "--> pad byte = " << readStringTag(1) << std::endl;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user