Hi,<br><br>I'm using the LiveMedia555 library and compiled it under Windows XP using Visual Studio 2005<br>With this environment i sometimes received a stackoverflow when using the library to receive a RTSP stream which contains a MPEG-2 TS stream
<br>Fortunaly i found out what causes it and this is the fix i'm using. <br><br>The problem is that:<br>1. MultiFramedRTPSource::doGetNextFrame1() is called<br>2. in this method afterGetting(this); is called<br>3. afterGetting(this) does a lot, but in the end it calls continuePlaying() which again calls MultiFramedRTPSource::doGetNextFrame()
<br>4. MultiFramedRTPSource::doGetNextFrame() again calls MultiFramedRTPSource::doGetNextFrame1() <br>which can lead to the stack overflow.<br><br>I added a simple boolean to check if we're already in doGetNextFrame1() and ifso, i simply return.
<br>Not sure if this is the best way todo it, but it works for me<br><br>static bool bInDoGetNextFrame1=false;<br>void MultiFramedRTPSource::doGetNextFrame1() {<br> if (bInDoGetNextFrame1) return;<br><br> bInDoGetNextFrame1=true;
<br> while (fNeedDelivery) {<br> .....<br><br>Another thing i noticed is that many pointers,buffers,variables are not initialized correctly in the constructors.<br>The library assumed that the compiler initializes all variables to 0 but this is not the case
<br>when using visual studio in debug mode. In debug mode the compiled initializes all variabled with the value 0xcd<br>which is especially done to detect un-initialized vars.<br>Perhaps it would be better to initialize all variables,buffers,pointers in the constructors
<br><br>Regards<br><br>Erwin Beckers<br><br>