[Asterisk-Dev] what might corrupt ulaw_encoder_pvt tail?

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Fri Dec 23 11:26:02 MST 2005


On Friday 23 December 2005 11:51, Goldfinger, Todd A wrote:
> I've written a short application to insert one linear pcm file into
> another.  It appears to work, but occasionally asterisk dies without
> warning when I later run ast_streamfile from a different application.
>  Whether asterisk crashes or not, the new file appears to be correct.
>  It's still 8k, 16bit.  I can open and listen to it.
>
> Sometimes, I get the following just before it dies.
>
> codec_ulaw.c:236 lintoulaw_framein: Out of buffer space
>
> I changed the warning to
>
> ast_log (LOG_WARNING, "Out of buffer space %d %d
> %d\n",tmp->tail,f->datalen/2,sizeof(tmp->outbuf));
>
> And I got this.
>
> codec_ulaw.c:236 lintoulaw_framein: Out of buffer space -262144 160
> 8096
>
> I don't understand why the if statement on line 234 would even
> execute.  But in any case, it seems tail is corrupted.  Does anyone
> know what might cause this?  I'm not sure where to go from here.

You have queued a frame with a negative datalen.  That gets processed,
and in so doing, corrupts tail.  You aren't seeing it in this debug,
because it was a previous frame, not the current one.

-- 
Tilghman



More information about the asterisk-dev mailing list