<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><blockquote type="cite"><div>I'm trying to streaming a ts from from 264 es stream, the pipeline is like:</div><div>ByteStreamFileSource->H264VideoStreamFramer->MPEG2TransportStreamFromESSource->MPEG2TransportStreamFramer.</div><div>
While at the end of playback, there's a little chance to crash.</div><div><br></div><div>In MPEG2TransportStreamFromESSource.cpp, </div><div>void MPEG2TransportStreamFromESSource::awaitNewBuffer(unsigned char* oldBuffer)</div>
<div>There's a piece of code like:</div><div>--------------------------------</div><div>...</div><div><div> // No filled-in buffers are available. Ask each of our inputs for data:</div><div> for (sourceRec = fInputSources; sourceRec != NULL;</div>
<div> sourceRec = sourceRec->next()) {</div><div> sourceRec->askForNewData();</div><div> }</div></div><div>----------------------------------------</div><div><br></div><div>After sourceRec->askForNewData(), the sourceRec may be destructed, and the "sourceRec=sourceRec->next()" will be a wild pointer.</div></blockquote><div><br></div>Yes, this can happen, if (and only if) the "MPEG2TransportStreamFromESSource" object gets deleted while we're in the loop.</div><div><br></div><div>To fix this, change the "MPEG2TransportStreamFromESSource::~MPEG2TransportStreamFromESSource()" implementation from</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>delete fInputSources;</div><div>to</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>doStopGettingFrames();</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>delete fInputSources; </div><div><br></div><div>Thank you for the report. This fix will be included in the next release of the software.</div><br><br><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">Ross Finlayson<br>Live Networks, Inc.<br><a href="http://www.live555.com/">http://www.live555.com/</a></span></span>
</div>
<br></body></html>