[Live-devel] stackoverflow
Jeff Shanab
jshanab at smartwire.com
Sat Dec 17 06:43:20 PST 2011
In my ESSource, a class based on the device source example is the only place I have a similar line, FramedSource::afterGetting(this). Replacing that with envir().taskScheduler().scheduleDelayedTask(0, (TaskFunc*)FramedSource::afterGetting, this) does not help.
However just commenting out the one in MP3FileSource and running that as if I am noin windows works for stopping the stack overflow. But there is no MP3 in the output. I am suspecting this is that the MP3 is not in the file format expected. I am stepping thru it now.
My sink has the continuePlaying architecure. My sinks afterGettingFrame1 ends by calling continuePlaying which is
Boolean MYsink::continuePlaying()
{
If (fSource == NULL)
Return false;
fSource->getNextFrame(fBuffer,fBufferSize,afterGettingFrame,this,onSourceClosure,this)
return true;
}
If I was to make the signature compatible with a TaskFunction, would scheduling it for the event loop work?
From: live-devel-bounces at ns.live555.com [mailto:live-devel-bounces at ns.live555.com] On Behalf Of Ross Finlayson
Sent: Friday, December 16, 2011 4:13 PM
To: LIVE555 Streaming Media - development & use
Subject: Re: [Live-devel] stackoverflow
This can happen, though only if both your input source and your output sink (and any filters in-between) are synchronous. E.g, if your input source is a file on Windoze (where file reading has to be synchronous), and your output sink is also a file. (It should *not* happen if your output sink is a "RTPSink".)
The way to overcome this is to find one place in your code (your own code, not the supplied source code!) that calls
afterGetting(this);
and replace this with:
envir().taskScheduler().scheduleDelayedTask(0, (TaskFunc*)afterGetting, this);
so that you'll return to the event loop rather than getting into a recursive call.
Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
________________________________
No virus found in this message.
Checked by AVG - www.avg.com<http://www.avg.com>
Version: 2012.0.1890 / Virus Database: 2108/4684 - Release Date: 12/16/11
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20111217/95c93d78/attachment.html>
More information about the live-devel
mailing list