From b8f800ee4d784b179a934a2f38c7ddcd6762e1bc Mon Sep 17 00:00:00 2001 From: Mohamed Ali Chebbi Date: Mon, 23 Jan 2023 17:26:52 +0100 Subject: [PATCH] add test/data for video support : format issue --- src/asfvideo.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/asfvideo.cpp b/src/asfvideo.cpp index cd0b6d10..b642bb4a 100644 --- a/src/asfvideo.cpp +++ b/src/asfvideo.cpp @@ -334,7 +334,7 @@ void AsfVideo::extendedStreamProperties() { void AsfVideo::streamProperties() { byte streamTypedBuf[GUID]; - io_->read(streamTypedBuf,GUID); + io_->read(streamTypedBuf, GUID); char stream_type[GUID_SIZE] = ""; getGUID(streamTypedBuf, stream_type); @@ -479,13 +479,13 @@ uint16_t AsfVideo::readWORDTag() { } std::string AsfVideo::readStringWCHAR(uint16_t length) { - DataBuf FieldBuf(length); + DataBuf FieldBuf(length + 1); io_->read(FieldBuf.data(), length); return Util::toString16(FieldBuf); } std::string AsfVideo::readString(uint16_t length) { - DataBuf FieldBuf(length); + DataBuf FieldBuf(length + 1); io_->read(FieldBuf.data(), length); return Exiv2::toString(FieldBuf.data()); }