[mythtv-commits] Ticket #1566: Recorded Programs page displays incorrect file sizes

MythTV mythtv at cvs.mythtv.org
Wed Mar 22 05:38:54 UTC 2006


#1566: Recorded Programs page displays incorrect file sizes
------------------------------+---------------------------------------------
 Reporter:  derek at battams.ca  |       Owner:  xris
     Type:  defect            |      Status:  new 
 Priority:  minor             |   Milestone:      
Component:  mythweb           |     Version:  head
 Severity:  medium            |  
------------------------------+---------------------------------------------
 The recorded programs page is displaying the incorrect file sizes (using
 SVN 9441).

 The first problem seems to be that all file sizes are off by a factor of
 1024:

 On the recorded programs page of mythweb, my recording of 'The Colbert
 Report' shows
 a file size of 1.1 TB.  The actual file size should be 1.1 GB.  All file
 sizes are
 off by this factor of 1024, so the first thing I did was remove the
 gmp_mul('1024',
 ...) on line 279 of includes/programs.php.  This showed the proper unit of
 the file.

 The other problem is that some files are showing a negative file size
 (even after removing the gmp_mul('1024', ...) call.

 {{{
 Using the original SVN 9441 source, the recorded programs page of mythweb
 shows a
 file size for my L&O: SVU recording as '-2009402966016 B'.  When I remove
 the
 multiply by 1024 call above the number changes to: '-1962307584 B'.  The
 actual file
 size is ~2.2GB (it's a one hour recording from a PVR-250 card using the
 default
 settings for bitrate, etc.).

 mythtv at mythtv-server:/myth/tv$ ls -l 2017_20060321220000.mpg
 -rw-r--r--  1 mythtv mythtv 2332659712 Mar 21 23:00
 2017_20060321220000.mpg
 }}}

 This would appear to be an integer overflow, perhaps?  I'm running this on
 Apache 2.0.55 and PHP 5.0.5 on an Intel 32-bit architecture.  I'm going to
 try to investigate the negative numbers when I have more time later in the
 week.  I'll try to submit a single patch that covers both issues, but if
 not I'll at least add one that removes the extra multiplying by 1024.

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/1566>
MythTV <http://www.mythtv.org/>
MythTV


More information about the mythtv-commits mailing list