[Live-devel] Corruption of the heap and Access violation reading errors at testRTSPClient.cpp [ on windows platform ]

Ross Finlayson finlayson at live555.com
Sat Mar 24 08:27:31 PDT 2012


Your problem is that you are trying to call LIVE555 code (specifically, your "Start()" and "Stop()" functions) from two separate threads.  As stated very clearly in the FAQ - ***that you were asked to read before you posted to this mailing list*** - you cannot do this!

Instead, you should call "Stop()" not from your 'main' thread, but instead from the 'LIVE555 event loop' thread - i.e., from the same thread in which you called "Start()".

To do this, you modify "Start()" to
- Create an "event trigger" with a handler function that will call "Stop()" - using the function "TaskScheduler::createEventTrigger()".
- Then, from your 'main' thread - after 10 seconds is elapsed, call "TaskScheduler::triggerEvent()".

(Note that "triggerEvent()" is the *only* LIVE555 function that you're permitted to call from a non-LIVE555 thread.)

For details, see "UsageEnvironment/UsageEnvironment.hh".  (Note also the example use of 'event triggers' in "liveMedia/DeviceSource.cpp".)


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/20120324/d942dd4a/attachment.html>


More information about the live-devel mailing list