bpa wrote:
> The original bug was a shortcut to designate type from extension (IIRC
> not the last 3 letters) name rather than scanning the contents.
The code I have identified does not actually check for an extension, but
rather the last three characters. This just looks like a mistake.
And it takes place _after_ scanning the contents and determining the
reported Content-Type.
I have confirmed the occurrence of bug by way of a trace into the
relevant LMS code, and observing that my Radio simply fails to reproduce
audio. It does not go into an 'endless reboot'.
The following is, I think, the change required to LMS. I get good
playback after applying it. It changes the match to recognize the
extension by requiring a '.' in the suffix, not just the last three
characters.
Code:
--------------------
# Bug 3396, some m4a audio is incorrectly served as audio/mpeg.
# In this case, prefer the file extension to the content-type
- if ( $url =~ /aac$/i && ($type eq 'mp3' || $type eq 'txt') ) {
+ if ( $url =~ /\.aac$/i && ($type eq 'mp3' || $type eq 'txt') ) {
$type = 'aac';
}
- elsif ( $url =~ /(?:m4a|mp4)$/i && ($type eq 'mp3' || $type eq 'txt') )
{
+ elsif ( $url =~ /(?:\.m4a|\.mp4)$/i && ($type eq 'mp3' || $type eq
'txt') ) {
$type = 'mp4';
}
--------------------
Currently enjoying Back Staba by Israel Vibration.
------------------------------------------------------------------------
mrw's Profile: http://forums.slimdevices.com/member.php?userid=38299
View this thread: http://forums.slimdevices.com/showthread.php?t=113719
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins