[mythtv] high/low word filesize -> something usable?

Jonathan Kolb jkolb-mythtv at greyshift.net
Tue Aug 5 23:23:44 EDT 2003


php ints are 32 bit, and signed, so they can't hold a full filesize.  You
have to convert to a float.

In includes/programs.php, around line 242, where you set filesize, I have it
changed thusly in my local tree (I hate having prettyprint data in the
class, so I was planning on changing it all over to the raw data and sending
you a patch).  This will automatically convert the numbers over to a float,
and handle the fact that php's ints cannot be unsigned.

$this->filesize = ($fs_high + ($fs_low < 0)) * 4294967296 + $fs_low;

Jon



More information about the mythtv-dev mailing list