[Live-devel] Issue faced with JPEGVideo

Ross Finlayson finlayson at live.com
Fri Jul 22 03:31:20 PDT 2005


>I am facing problem with the JPEGVideo (Source and
>Sink). When I initialize the
>OnDemandServerMediaSubsession  with the
>reuseFirstSource set to True, and try to Pause the
>stream, it will cause Segmentation Fault.
>
>My team mate and I traced the code, and found that
>this happen after the MediaSink::stopPlaying() was
>called.

Note that "MediaSink::stopPlaying()" calls the function 
"FramedSource::stopGettingFrames()" on its input source.  This in turn 
calls the virtual function "FramedSource::doStopGettingFrames()".  (See 
"FramedSource.cpp")

Because - in your case - your input source has events (timer alarms) 
pending when "MediaSink::stopPlaying()" is called, you must redefine the 
virtual function "doStopGettingFrames()" - for your source class - to turn 
off these pending timer alarms.  You can do this using
         envir().taskScheduler().unscheduleDelayedTask( ... )


	Ross Finlayson
	LIVE.COM
	<http://www.live.com/>



More information about the live-devel mailing list