[mythtv-commits] Ticket #4431: Field "size" in struct VideoInfo is not OK for large files
MythTV
mythtv at cvs.mythtv.org
Sat Jan 5 15:36:30 UTC 2008
#4431: Field "size" in struct VideoInfo is not OK for large files
----------------------------------------+-----------------------------------
Reporter: michele.sardo at katamail.com | Owner: paulh
Type: defect | Status: new
Priority: minor | Milestone: unknown
Component: mytharchive | Version: 0.20.2
Severity: medium | Mlocked: 0
----------------------------------------+-----------------------------------
In file videoselector.h, the struct VideoInfo contains a field as follow:
{{{
uint size;
}}}
this is meant to keep file size, but it is inadequate for files bigger
than 2^32^-1 bytes (4GB). My proposal is to replace uint with unsigned
long long.
Also in videoselector.cpp, this field is initialized by the following
code:
{{{
QFile file(v->filename);
if (file.exists())
v->size = (long long)file.size();
}}}
the QT3.3 library call file.size() seems to return correct size for files
bigger that 4GB in a 64bit machine, but returns incorrect size in a 32bit
machine.
--
Ticket URL: <http://svn.mythtv.org/trac/ticket/4431>
MythTV <http://svn.mythtv.org/trac>
MythTV
More information about the mythtv-commits
mailing list