Bugzilla – Bug 17860
v7.7.x Broken code in Slim::Player::Protocols::HTTP
Last modified: 2012-01-10 08:11:24 UTC
In v7.7 you broke some existing code concerning x-audiocast-bitrate and icy-br headers. These headers should communicate the kbps value. But in v7.7 you introduced some code to kludge that to bps for bit rates above 1000kbps. => This breaks existing code. For example if a server is delivering a 44100Hz 16bit 2channel stream, it would provide x-audiocast-bitrate: 1411 (kbps) and the v7.7.x code would NOT multiply that number by 1000, so SBS would believe it is working with an exceedingly low bitrate stream. Slim::Player::Protocols::HTTP sub parseDirectHeaders { v7.5.x elsif ($header =~ /^(?:icy-br|x-audiocast-bitrate):\s*(.+)/i) { $bitrate = $1 * 1000; v7.7.x elsif ($header =~ /^(?:icy-br|x-audiocast-bitrate):\s*(.+)/i) { $bitrate = $1; $bitrate *= 1000 if $bitrate < 1000; Proposed solution elsif ($header =~ /^(?:icy-br|x-audiocast-bitrate):\s*(.+)/i) { $bitrate = $1; $bitrate *= 1000 if length($bitrate) < 5;