Bug 8601 - WavPack files with large RIFF headers not parsed correctly
: WavPack files with large RIFF headers not parsed correctly
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Formats
: unspecified
: All All
: -- normal (vote)
: 7.x
Assigned To: Andy Grundman
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-06-28 22:28 UTC by David Bryant
Modified: 2009-07-31 10:23 UTC (History)
2 users (show)

See Also:
Category: ---


Attachments
WavPack file showing parsing error (bad sample rate, etc.) (1.11 MB, application/octet-stream)
2008-06-28 22:28 UTC, David Bryant
Details
Fix for WavPack.pm (4.64 KB, patch)
2008-06-30 11:51 UTC, Peter McQuillan
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Bryant 2008-06-28 22:28:55 UTC
Created attachment 3508 [details]
WavPack file showing parsing error (bad sample rate, etc.)

I have found a minor problem with the WavPack.pm code. If a WavPack file is generated from a WAV file with a large RIFF header (over 4096 bytes) then the resulting WavPack file is not parsed correctly and weird data is returned for sample rate, bitdepth, and duration. The file still plays correctly because the wvunpack program does not have this bug. RIFF headers of that size are not common at all, but the recent free release of The Slip by Nine Inch Nails had 12288-byte RIFF headers, and that's how I discovered the problem.

The actual issue is that the first block of the WavPack file ends up being dedicated to the RIFF header and no actual samples (or sample information) are present until the next block. I have created a test file that displays the problem by simulating this situation (I could not provide a track from The Slip because they're huge).

Peter (who wrote the plugin) should have no problem providing a fix for this if he is available (I have cc'd him). If not, then I will try my hand at it (although I'm not fluent in Perl).

Thanks!
Comment 1 Andy Grundman 2008-06-30 09:17:08 UTC
Thanks, please assign this bug to me once you have a patch.
Comment 2 Peter McQuillan 2008-06-30 11:51:19 UTC
Created attachment 3516 [details]
Fix for WavPack.pm

I think this patch should fix the bug. It gives the correct information for the sample file (as checked against the command line wvunpack -ss command).
Comment 3 Peter McQuillan 2008-06-30 11:55:30 UTC
This patch works with all the files I've tested so far, and works with the problem sample file. Hopefully David will also be able to confirm with his music library.
Comment 4 Andy Grundman 2008-06-30 12:11:59 UTC
Thanks, applied as 7.1 change 21350.
Comment 5 David Bryant 2008-07-06 06:42:53 UTC
I have tested this fix extensively on both Windows and Ubuntu and it seems to both resolve the problem and not introduce any other issues. Thanks Peter and Andy!
Comment 6 Chris Owens 2008-07-30 15:27:46 UTC
This bug has now been fixed in the 7.1 release version of SqueezeCenter!  Please download the new version from http://www.slimdevices.com if you haven't already.  

If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.
Comment 7 James Richardson 2008-12-15 12:33:01 UTC
This bug has been fixed in the 7.3.0 release version of SqueezeCenter!

Please download the new version from http://www.slimdevices.com/su_downloads.html if you haven't already.  

If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.
Comment 8 Chris Owens 2009-07-31 10:23:29 UTC
Reduce number of active targets for SC