I'm working on HLS based on Live555. I test mediaServer for HLS.it's crashed try to get a playlist.
The problem is in the function RTSPServerSupportingHTTPStreaming::RTSPClientSessionSupportingHTTPStreaming( ) { ..... fPlaylistSource = ByteStreamMemoryBufferSource::createNew(envir(), (u_int8_t*)playlist, playlistLen); if (fTCPSink == NULL) fTCPSink = TCPStreamSink::createNew(envir(), fClientOutputSocket); fTCPSink->startPlaying(*fPlaylistSource, afterStreaming, this); } fTCPSink->startPlaying(...) will call afterStreaming() when sending is done. void RTSPServerSupportingHTTPStreaming::RTSPClientSessionSupportingHTTPStreaming: :afterStreaming(void* clientData) { RTSPServerSupportingHTTPStreaming::RTSPClientSessionSupportingHTTPStreaming* clientSession = (RTSPServerSupportingHTTPStreaming::RTSPClientSessionSupportingHTTPStreaming *)clientData; delete clientSession; } In the afterStreaming() function will delete himself. RTSPServer::RTSPClientSession::handleRequestBytes(int newBytesRead) { ... handleHTTPCmd_StreamingGET(urlSuffix, (char const*)fRequestBuffer); ... /****Crash here **/ /***Since this pointer is invalid this time. It has been delete in handleHTTPCmd_StreamingGET(...)**/ send(fClientOutputSocket, (char const*)fResponseBuffer, strlen((char*)fResponseBuffer), 0); if (strcmp(cmdName, "SETUP") == 0 && fStreamAfterSETUP) { // The client has asked for streaming to commence now, rather than after a // subsequent "PLAY" command. So, simulate the effect of a "PLAY" command: handleCmd_withinSession("PLAY", urlPreSuffix, urlSuffix, cseq, (char const*)fRequestBuffer); } resetRequestBuffer(); // to prepare for any subsequent request } while (0); } Do you any idea? I use VS2010. Thank very much. Daniel _______________________________________________ live-devel mailing list live-devel@lists.live555.com http://lists.live555.com/mailman/listinfo/live-devel