Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: VDR developer version 1.1.22
On 26 Jan 2003 Andreas Kool <akool@akool.de> wrote:
> On Sunday 26 January 2003 19:23, Stefan Huelswitt wrote:
>> On 26 Jan 2003 Klaus Schmidinger <Klaus.Schmidinger@cadsoft.de> wrote:
>>
>> A quick fix to make the MP3 plugin compile under 1.1.22:
>
> Woooouuuuh! Your fix was faster than my error report!
Too fast, doesn't work good :-(
Better:
--- vdr-1.1.21/PLUGINS/src/mp3/network.c 2002-12-13 20:04:02.000000000 +0100
+++ vdr-1.1.22/PLUGINS/src/mp3/network.c 2003-01-26 20:08:59.000000000 +0100
@@ -190,7 +190,7 @@
// -- cNet ---------------------------------------------------------------------
cNet::cNet(int size, int ConTimeoutMs, int RwTimeoutMs)
-:cRingBufferLinear(size>0?size:BUFFERSIZE,false)
+:cRingBufferLinear(size>0?size:BUFFERSIZE,1,false)
{
fd=-1; deferedErrno=0; count=0;
connected=netup=false;
@@ -314,16 +314,21 @@
int cNet::RingRead(unsigned char *dest, int len)
{
- int r;
- do {
+ int r=0;
+ const uchar *rd;
+ for(;;) {
if(!Available() && deferedErrno) {
d(printf("net: ringbuffer empty, async read bailed out\n"))
return -1;
}
- r=Get(dest,len);
- } while(!r);
- EnablePut();
- return r;
+ rd=Get(r);
+ if(rd && r>0) {
+ memcpy(dest,rd,r);
+ Del(r);
+ EnablePut();
+ return r;
+ }
+ }
}
void cNet::Action(void)
--
Stefan Huelswitt
huels@iname.com | http://home.pages.de/~nathan
--
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe vdr" as subject.
Home |
Main Index |
Thread Index