Mercurial > mplayer.hg
comparison libmpdemux/demux_rtp.cpp @ 7143:fdfc10c2e2d2
- Tell the RTSP client code to use the string "mplayer" in RTSP
"User-Agent:" fields. NOTE: This requires an up-to-date version of the
LIVE.COM Streaming Media libraries.
- Fix a bug that could cause mplayer to crash on exit if a "rtsp://" URL was bad.
patch by Ross Finlayson <finlayson@live.com>
author | arpi |
---|---|
date | Thu, 29 Aug 2002 20:19:33 +0000 |
parents | 2af81c9ed167 |
children | 0a936b10b3d8 |
comparison
equal
deleted
inserted
replaced
7142:ea3f7a306873 | 7143:fdfc10c2e2d2 |
---|---|
109 // We weren't given a SDP description directly, so assume that | 109 // We weren't given a SDP description directly, so assume that |
110 // we were give a RTSP URL | 110 // we were give a RTSP URL |
111 char const* url = demuxer->stream->streaming_ctrl->url->url; | 111 char const* url = demuxer->stream->streaming_ctrl->url->url; |
112 | 112 |
113 extern int verbose; | 113 extern int verbose; |
114 rtspClient = RTSPClient::createNew(*env, verbose); | 114 rtspClient = RTSPClient::createNew(*env, verbose, "mplayer"); |
115 if (rtspClient == NULL) { | 115 if (rtspClient == NULL) { |
116 fprintf(stderr, "Failed to create RTSP client: %s\n", | 116 fprintf(stderr, "Failed to create RTSP client: %s\n", |
117 env->getResultMsg()); | 117 env->getResultMsg()); |
118 break; | 118 break; |
119 } | 119 } |
308 extern "C" void demux_close_rtp(demuxer_t* demuxer) { | 308 extern "C" void demux_close_rtp(demuxer_t* demuxer) { |
309 // Reclaim all RTP-related state: | 309 // Reclaim all RTP-related state: |
310 | 310 |
311 // Get the RTP state that was stored in the demuxer's 'priv' field: | 311 // Get the RTP state that was stored in the demuxer's 'priv' field: |
312 RTPState* rtpState = (RTPState*)(demuxer->priv); | 312 RTPState* rtpState = (RTPState*)(demuxer->priv); |
313 if (rtpState == NULL) return; | |
313 UsageEnvironment* env = NULL; | 314 UsageEnvironment* env = NULL; |
314 TaskScheduler* scheduler = NULL; | 315 TaskScheduler* scheduler = NULL; |
315 if (rtpState->mediaSession != NULL) { | 316 if (rtpState->mediaSession != NULL) { |
316 env = &(rtpState->mediaSession->envir()); | 317 env = &(rtpState->mediaSession->envir()); |
317 scheduler = &(env->taskScheduler()); | 318 scheduler = &(env->taskScheduler()); |