Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcec93d6

Browse files
committed
fix: correctly retrieve the fileSize on 32 bits OS
"size_t" size depends on the OS. On 32-bit system it can only hold a 32bits variable = 4 294 967 296, which is not enough to store a big filesize (e.g: 14Go). We should use a 64-bits variable
1 parent1c318c2 commitcec93d6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

‎src/AvTranscoder/properties/FileProperties.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ size_t FileProperties::getBitRate() const
210210
return _avFormatContext->bit_rate;
211211
}
212212

213-
size_tFileProperties::getFileSize()const
213+
unsigned __int64FileProperties::getFileSize()const
214214
{
215215
std::ifstreamin(getFilename().c_str(), std::ios::binary | std::ios::ate);
216216
return in.tellg();

‎src/AvTranscoder/properties/FileProperties.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class AvExport FileProperties
4949
doublegetStartTime()const;
5050
floatgetDuration()const;///< in seconds, 0 if not available
5151
size_tgetBitRate()const;///< total stream bitrate in bit/s, 0 if not available (result of a computation by ffmpeg)
52-
size_tgetFileSize()const;///< in bytes
52+
unsigned __int64getFileSize()const;///< in bytes
5353
size_tgetPacketSize()const;
5454

5555
const PropertyVector&getMetadatas()const {return _metadatas; }

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp