Bug 17860 - v7.7.x Broken code in Slim::Player::Protocols::HTTP
: v7.7.x Broken code in Slim::Player::Protocols::HTTP
Status: UNCONFIRMED
Product: Logitech Media Server
Classification: Unclassified
Component: Streaming To SlimServer
: 7.7.1
: PC Windows 7
: -- normal (vote)
: ---
Assigned To: Unassigned bug - please assign me!
http://forums.slimdevices.com/showthr...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-01-10 08:11 UTC by AndrewFG
Modified: 2012-01-10 08:11 UTC (History)
0 users

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description AndrewFG 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;