[Icecast-dev] libshout crashing during pause
George R. Welch
george at grwelch.com
Mon Sep 17 10:44:28 PDT 2012
On 9/17/12 12:37 PM, Michael Smith wrote:
> 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?
Yes, I have checked carefully. I can supply you with a test program
that demonstrates this if you like.
> 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.
OK, that is very useful.
>> 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
> buffer sizes.
Again, this is incredibly useful. I guess in between my batches of
content I could just send it -80 db of pink noise, or something? Does
that sound about right?
Thank you very much for your help!
More information about the Icecast-dev