[Live-devel] Is this a known issue in MPEG2TransportStreamFromESSource?
Ross Finlayson
finlayson at live555.com
Sun Sep 9 21:35:38 PDT 2012
> I'm trying to streaming a ts from from 264 es stream, the pipeline is like:
> ByteStreamFileSource->H264VideoStreamFramer->MPEG2TransportStreamFromESSource->MPEG2TransportStreamFramer.
> While at the end of playback, there's a little chance to crash.
>
> In MPEG2TransportStreamFromESSource.cpp,
> void MPEG2TransportStreamFromESSource::awaitNewBuffer(unsigned char* oldBuffer)
> There's a piece of code like:
> --------------------------------
> ...
> // No filled-in buffers are available. Ask each of our inputs for data:
> for (sourceRec = fInputSources; sourceRec != NULL;
> sourceRec = sourceRec->next()) {
> sourceRec->askForNewData();
> }
> ----------------------------------------
>
> After sourceRec->askForNewData(), the sourceRec may be destructed, and the "sourceRec=sourceRec->next()" will be a wild pointer.
Yes, this can happen, if (and only if) the "MPEG2TransportStreamFromESSource" object gets deleted while we're in the loop.
To fix this, change the "MPEG2TransportStreamFromESSource::~MPEG2TransportStreamFromESSource()" implementation from
delete fInputSources;
to
doStopGettingFrames();
delete fInputSources;
Thank you for the report. This fix will be included in the next release of the software.
Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20120909/80a41432/attachment.html>
More information about the live-devel
mailing list