[Icecast-dev] libshout crashing during pause
mlrsmith at gmail.com
Mon Sep 17 10:37:20 PDT 2012
On Mon, Sep 17, 2012 at 9:29 AM, George R. Welch <george at grwelch.com> wrote:
> Hello. For various reasons I am writing my own source client.
> Most things seem to be working well. Connections work. shout_send() and
> shout_sync() seem to behave as expected.
> However, I find that if more than about 10-20 seconds passes between
> shout_send() calls then libshout crashes (takes my client down) during a
> subsequent shout_send().
Are you sure it's libshout crashing, and not your application?
It's normal for libshout to return an error in this sort of situation,
but I don't know of any bugs that would make it crash - but maybe your
application isn't handling the error case correctly.
> Are there any rules about how often shout_send() should be called? (Yes, I
> know about shout_sync.)
Typically: multiple times per second. Worst case every couple of
seconds is ok in most cases.
> How can I keep the library from crashing if long stretches of time pass with
> no input to the server?
Like I said: it shouldn't crash (see below).
> Background: What I want to do is periodically stream a file (or several) to
> icecast, but with stretches of time in between with nothing playing. I want
> the mount-point active so that listeners can connect (even if nothing is
> currently playing). Then whenever my client sends another stream to icecast,
> the various listeners would just hear it.
That's not how icecast works. If the source client isn't sending data
continuously, icecast will disconnect the source.
It's up to you to create a continuous stream to send to icecast, even
if it doesn't contain "interesting" content. Pure digital silence
isn't recommended though, because it interacts badly with client
More information about the Icecast-dev