[Live-devel] Shutdown crash with MPEG4VideoStreamDiscreteFramer

Alex Cichowski alex.cichowski at gmail.com
Mon Nov 17 23:00:23 PST 2008


Hi all,

I have a custom MediaSink subclass drawing data from an
MPEG4VideoStreamDiscreteFramer (for the purpose of determining where
the keyframes are), which is in turn drawing data from an
MPEG4ESVideoRTPSource. I am running into a problem where during
cleanup, the MPEG4ESVideoRTPSource gets deleted too early due to the
following destructor code for
MPEG4VideoStreamDiscreteFramer:

    FramedFilter::~FramedFilter() {
      Medium::close(fInputSource);
    }

When the MediaSession is closed following this (I gather from OpenRTSP
that this is the correct cleanup order), the RTCPInstance of the
subsession still has a pointer to the MPEG4ESVideoRTPSource, which it
uses in RTCPInstance::enqueueCommonReportPrefix() during shutdown
(fSource->receptionStatsDB()), causing a crash.

As a workaround, I have created a patch (attached) for FramedFilter
that adds a "detachInputSource()" which can be used to disable
"Medium::close(fInputSource);" in the above before the cleanup
sequence. Is this an appropriate solution?

Thanks,
Alex
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FramedFilter_detachInputSource.patch
Type: application/octet-stream
Size: 1168 bytes
Desc: not available
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20081118/feaca8e1/attachment.obj>


More information about the live-devel mailing list