Opened 16 years ago

Closed 16 years ago

#4431 closed defect (fixed)

Field "size" in struct VideoInfo is not OK for large files

Reported by: michele.sardo@… Owned by: paulh
Priority: minor Milestone: 0.21
Component: mytharchive Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

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 232-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.

Change History (2)

comment:1 Changed 16 years ago by paulh

Milestone: unknown0.21
Version: 0.20.2head

I'm just going to update trunk for now. Hopefully the 0.21 release wont be too far off.

comment:2 Changed 16 years ago by paulh

Resolution: fixed
Status: newclosed

(In [15345]) Allow MythArchive? to handle very large (>4Gb) MythVideo? files.

Fixes #4431.

Note: See TracTickets for help on using tickets.