From ada14ae292dee9a8bf38ee1ef14c920d26b0abd6 Mon Sep 17 00:00:00 2001 From: Mohamed Ali Chebbi Date: Sun, 5 Feb 2023 00:26:21 +0100 Subject: [PATCH] add test/data for video support : use readStraingTag instead of read --- src/riffvideo.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/riffvideo.cpp b/src/riffvideo.cpp index 0cc935c3..59be1526 100644 --- a/src/riffvideo.cpp +++ b/src/riffvideo.cpp @@ -404,16 +404,16 @@ bool RiffVideo::equal(const std::string& str1, const std::string& str2) { } void RiffVideo::readList(HeaderReader& header_) { - DataBuf FormTypeBuf_ = io_->read(DWORD); + std::string chunk_type = readStringTag(io_); #ifdef EXIV2_DEBUG_MESSAGES - EXV_DEBUG << "-> Reading list : id= " << header_.getId() << " type= " << Exiv2::toString(FormTypeBuf_.data()) - << " size= " << header_.getSize() << "(" << io_->tell() << "/" << io_->size() << ")" << std::endl; + EXV_DEBUG << "-> Reading list : id= " << header_.getId() << " type= " << chunk_type << " size= " << header_.getSize() + << "(" << io_->tell() << "/" << io_->size() << ")" << std::endl; #endif - if (equal(Exiv2::toString(FormTypeBuf_.data()), CHUNK_ID_INFO)) + if (equal(chunk_type, CHUNK_ID_INFO)) readInfoListChunk(header_.getSize()); - else if (equal(Exiv2::toString(FormTypeBuf_.data()), CHUNK_ID_MOVI)) { + else if (equal(chunk_type, CHUNK_ID_MOVI)) { readMoviList(header_.getSize()); } }