Thanks Andrew - I've tried with a lower chunk size and got the same result, unfortunately. What is strange is that it *only* shows that problem with FLAC. It works with raw PCM and MP3. I also have the option to not send the content-length but it gives exactly the same result (again, problem only with flac). The only case where it works with flac is when I send a real content-length but then I fall into another issue as MC, contrary to other renderers, when told that content-type is N bytes, it wants N bytes and even if I close the socket, it re-opens it and asks for the same URI again and again. Other players consider a socket close as a end of file and move to the next URI (if any).
As the problem only happens with FLAC, I'm wondering if there is something special in JRiver when handling FLAC for unknown file size. I also have the option in my application to not send a flac header (flac normally allows that as a streamable format, each chunk contains enough information), but that does not change anything
The difficulty of my application is that it is a bridge between 2 "domains" so I don't have access to the full size of the data to send nor do I have the full content available at start - I have to treat everything as a stream, although I often have a large amount of data already cached, so I can send lots of MB to the renderer as fast as it can eat them - normally, this works fine with TCP flow control