PDA

View Full Version : Bug & patch in Pipeline.pm



bpa
2006-06-05, 17:02
I have been trying to get an AACPlus Shoutcast type stream to be streamed through Mplayer letting Slimserver handle the metadata. While playing streams I found that data was being occasionally lost and Mplayer would have to resync.

I think I have tracked the problem down to pipeline.pm when the following line fails (i.e. EWOULDBLOCK)


my $writelen = $writer->syswrite($pendingBytes, $pendingSize);
then data just read in and stored in $pendingBytes is not saved before the routine returns. My fix is to save $PendingBytes and $pendingSize before returning.


else {
${*$self}{'pipeline_pending_bytes'} = $pendingBytes;
${*$self}{'pipeline_pending_size'} = $pendingSize;

return $writelen;
}
$loop = 1;

}

Dan Sully
2006-06-05, 20:45
* bpa shaped the electrons to say...

>I have been trying to get an AACPlus Shoutcast type stream to be
>streamed through Mplayer letting Slimserver handle the metadata. While
>playing streams I found that data was being occasionally lost and
>Mplayer would have to resync.

Would it be possible to create a proper unified diff against the source?

Thanks.

-D
--
<faisal> my life is collapsing to what will soon be NEGATIVE INTEGER degrees of separation.

bpa
2006-06-06, 00:58
Attached is a diff file.

This problem shows up most on Windows (it seems to have smaller pipe buffers) and when changing songs - metadata related. I expect other users of this mechanism should have seen occasional data loss/corruption possibly showing up as decoding problems.

Edit:
This patch is applicable to 6.3 and 6.5

Triode
2006-06-06, 12:52
Bryan, Dan,

I've added this to trunk (r7771) as it is definately causing data to be lost - will leave it up to Dan to decide when to backport to
6.3..

Adrian
----- Original Message -----
From: "bpa" <bpa.28z0lz1149580801 (AT) no-mx (DOT) forums.slimdevices.com>
To: <developers (AT) lists (DOT) slimdevices.com>
Sent: Tuesday, June 06, 2006 8:58 AM
Subject: [Developers] Re: Bug & patch in Pipeline.pm


>
> Attached is a diff file.
>
> This problem shows up most on Windows (it seems to have smaller pipe
> buffers) and when changing songs - metadata related. I expect other
> users of this mechanism should have seen occasional data
> loss/corruption possibly showing up as decoding problems.

Dan Sully
2006-06-06, 12:54
* Triode shaped the electrons to say...

>I've added this to trunk (r7771) as it is definately causing data to be
>lost - will leave it up to Dan to decide when to backport to 6.3..

Yes - please backport to 6.3

Thanks

-D
--
Welcome to hell. Here's your accordion.