diff --git a/msvc2003/exiv2lib/exiv2lib.vcproj b/msvc2003/exiv2lib/exiv2lib.vcproj
index 66fd2094..623e7dc8 100644
--- a/msvc2003/exiv2lib/exiv2lib.vcproj
+++ b/msvc2003/exiv2lib/exiv2lib.vcproj
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/msvc2005/exiv2lib/exiv2lib.vcproj b/msvc2005/exiv2lib/exiv2lib.vcproj
index 26cde850..ce8b84d6 100644
--- a/msvc2005/exiv2lib/exiv2lib.vcproj
+++ b/msvc2005/exiv2lib/exiv2lib.vcproj
@@ -1 +1,1074 @@
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/quicktimevideo.cpp b/src/quicktimevideo.cpp
index 9fc17849..2f440568 100644
--- a/src/quicktimevideo.cpp
+++ b/src/quicktimevideo.cpp
@@ -1909,7 +1909,7 @@ void QuickTimeVideo::sampleDesc(uint32_t size)
uint64_t cur_pos = io_->tell();
io_->read(buf.pData_, 4);
io_->read(buf.pData_, 4);
- uint32_t noOfEntries = returnUnsignedBufValue(buf);
+ uint64_t noOfEntries = returnUnsignedBufValue(buf);
for(uint32_t i = 1; i <= noOfEntries; i++){
if (d->currentStream_ == Video) imageDescDecoder();
else if (d->currentStream_ == Audio) audioDescDecoder();
@@ -2448,7 +2448,7 @@ void QuickTimeVideo::mediaHeaderDecoder(uint32_t size)
case MediaDuration:
io_->read(buf.pData_,4);
time_scale = returnBufValue(buf);
- bDataWritten = writeAudVidData("MediaDuration", time_scale, 4, 0, 0); break;
+ bDataWritten = writeAudVidData("MediaDuration", (double) time_scale, 4, 0, 0); break;
case MediaLanguageCode:
if(d->currentStream_ == Video){
if(xmpData_["Xmp.video.MediaLanguage"].count() > 0){
@@ -2556,23 +2556,25 @@ void QuickTimeVideo::trackHeaderDecoder(uint32_t size)
bool QuickTimeVideo::writeAudVidData
( std::string sXmpTag, double iMulFactor, int64_t iBytCnt, int64_t iOffset, int64_t iRetFuncCall)
{
- DataBuf buf(5);
+ // DataBuf buf(5);
bool bRetVal = false;
int64_t iXmpTagVal = 0;
if(d->currentStream_ == Video){
if(xmpData_["Xmp.video." + sXmpTag].count() > 0){
- iXmpTagVal = xmpData_["Xmp.video." + sXmpTag].toLong()*iMulFactor;
- if(iRetFuncCall == 0) buf = returnBuf(iXmpTagVal, iBytCnt);
- else buf = returnUnsignedBuf(iXmpTagVal);
- bRetVal = writeMultibyte(buf.pData_, iBytCnt ,iOffset);
+ iXmpTagVal = (int64_t) (xmpData_["Xmp.video." + sXmpTag].toLong()*iMulFactor);
+ DataBuf buf = iRetFuncCall == 0 ? returnBuf(iXmpTagVal, (int32_t) iBytCnt)
+ : returnUnsignedBuf(iXmpTagVal)
+ ;
+ bRetVal = writeMultibyte(buf.pData_, iBytCnt ,iOffset);
}
}
else if(d->currentStream_ == Audio){
if(xmpData_["Xmp.audio." + sXmpTag].count() > 0){
iXmpTagVal = xmpData_["Xmp.audio." + sXmpTag].toLong()*iMulFactor;
- if(iRetFuncCall == 0) buf = returnBuf(iXmpTagVal, iBytCnt);
- else buf = returnUnsignedBuf(iXmpTagVal);
+ DataBuf buf = iRetFuncCall == 0 ? returnBuf(iXmpTagVal, (int32_t) iBytCnt)
+ : returnUnsignedBuf(iXmpTagVal)
+ ;
bRetVal = writeMultibyte(buf.pData_, iBytCnt ,iOffset);
}
}
diff --git a/src/types.cpp b/src/types.cpp
index 61f3f6ac..e36eb31c 100644
--- a/src/types.cpp
+++ b/src/types.cpp
@@ -143,12 +143,14 @@ namespace Exiv2 {
}
}
+#ifndef _MSC_VER
DataBuf& DataBuf::operator=(DataBuf& rhs)
{
if (this == &rhs) return *this;
reset(rhs.release());
return *this;
}
+#endif
void DataBuf::alloc(long size)
{
diff --git a/src/types.hpp b/src/types.hpp
index 42bd3355..4ae8e121 100644
--- a/src/types.hpp
+++ b/src/types.hpp
@@ -230,7 +230,11 @@ namespace Exiv2 {
buffer at the original object similar to std::auto_ptr, i.e.,
the original object is modified.
*/
+#ifndef _MSC_VER
+ // MSVC reports a template confusion with DataBufRef for this
+ // It seems to be harmless to omit this and rely on the DataBufRef code
DataBuf& operator=(DataBuf& rhs);
+#endif
/*!
@brief Allocate a data buffer of at least the given size. Note that if
the requested \em size is less than the current buffer size, no