Having finally got icecast2 running, I found that freeamp didn't play the
stream correctly. Here's a patch for the problem. Basically, it's not
dealing correctly with one possible return from ov_read() (this happens
usually when connecting to a stream, and won't usually occur with files)
However, it still fails on bitstream boundaries (i.e. between each track in
a stream). A failed assertion occurs, which appears to be because the
BeginWrite() call failed on line 428 of vorbislmc.cpp - any ideas? I can't
see anything obvious for this one, but I don't know any of the freeamp code
at all well.
Michael
Index: vorbislmc.cpp
===================================================================
RCS file: /src/repository/freeamp/lmc/vorbis/src/vorbislmc.cpp,v
retrieving revision 1.16
diff -u -r1.16 vorbislmc.cpp
--- vorbislmc.cpp 2001/03/06 17:19:18 1.16
+++ vorbislmc.cpp 2001/03/07 13:04:26
@@ -399,7 +399,7 @@
section = -1;
ret = ov_read(&m_vf, (char *)pOutBuffer, iDecodeBlockSize,
0, 2, 1, §ion);
- if (ret <= 0)
+ if (ret == 0)
{
m_pOutputBuffer->EndWrite(0);
break;
@@ -476,6 +476,7 @@
}
}
}
+ if(ret <0) ret=0; // hole/error in data - we can safely ignore this
m_pOutputBuffer->EndWrite(ret);
bytesCopied += ret;
}