> 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/

_______________________________________________
live-devel mailing list
[email protected]
http://lists.live555.com/mailman/listinfo/live-devel

Reply via email to