[Asterisk-Dev] what might corrupt ulaw_encoder_pvt tail?
Goldfinger, Todd A
goldfita at rose-hulman.edu
Fri Dec 23 11:46:06 MST 2005
How do I get a negative datalen? Can the file being read cause that? I'm not working at this level. The only functions I call are ast_seekstream, ast_stopstream, ast_openstream, etc.
--
-Todd
812-251-6644
-----Original Message-----
From: asterisk-dev-bounces at lists.digium.com on behalf of Tilghman Lesher
Sent: Fri 12/23/2005 1:26 PM
To: Asterisk Developers Mailing List
Subject: Re: [Asterisk-Dev] what might corrupt ulaw_encoder_pvt tail?
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
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
Asterisk-Dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 3969 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-dev/attachments/20051223/b97c9356/attachment.bin
More information about the asterisk-dev
mailing list