leosongwei / mutagen

Automatically exported from code.google.com/p/mutagen
GNU General Public License v2.0
0 stars 0 forks source link

FLAC sample rate and length - division by zero error #117

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The attached file gives me this error when I try loading it:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/mutagen/__init__.py", line 73, in __init__
    self.load(filename, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/mutagen/flac.py", line 584, in load
    while self.__read_metadata_block(fileobj):
  File "/usr/lib/python2.7/dist-packages/mutagen/flac.py", line 532, in __read_metadata_block
    block = self.METADATA_BLOCKS[byte & 0x7F](data)
  File "/usr/lib/python2.7/dist-packages/mutagen/flac.py", line 58, in __init__
    self.load(data)
  File "/usr/lib/python2.7/dist-packages/mutagen/flac.py", line 141, in load
    self.length = self.total_samples / float(self.sample_rate)
ZeroDivisionError: float division by zero

Original issue reported on code.google.com by thecraze...@gmail.com on 27 Jul 2012 at 8:05

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by reiter.christoph@gmail.com on 27 Jul 2012 at 9:11

GoogleCodeExporter commented 9 years ago

Original comment by reiter.christoph@gmail.com on 27 Jul 2012 at 9:11

GoogleCodeExporter commented 9 years ago
Do you know where this file is coming from (Program, Download source...)?

Original comment by reiter.christoph@gmail.com on 30 Jul 2012 at 3:46

GoogleCodeExporter commented 9 years ago
The file includes a second all zero, way too big, StreamInfo block.

We could ignore the second one if it fails, but libflac doesn't load it, so I 
guess we shouldn't either.

Still curious where this came from.

Original comment by reiter.christoph@gmail.com on 30 Jul 2012 at 4:20

Attachments:

GoogleCodeExporter commented 9 years ago
It's from the current Humble Bundle's version of OK Go's Twelve Remixes of Four 
Songs. No clue other than that.

http://www.humblebundle.com

(Much thanks for looking at it!)

Original comment by thecraze...@gmail.com on 31 Jul 2012 at 12:16

GoogleCodeExporter commented 9 years ago
For reference, if need be, the Humble Bundle's files have now been fixed;
http://www.head-fi.org/t/606418/humble-bundle-other-indie-bundles-thread/15
(near the bottom)

I have not confirmed it myself though

Original comment by Jack.Thatch@gmail.com on 31 Jul 2012 at 11:39

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r128.

Original comment by reiter.christoph@gmail.com on 6 Aug 2012 at 1:16