[MPlayer-dev-eng] Some minor patches (for RTSP/RTP streaming)
Ross Finlayson
finlayson at live.com
Thu Aug 29 13:31:02 CEST 2002
These patches do the following:
1/ Fix a bug that causes mplayer to crash if "-dumpstream" is used with a
RTP stream.
2/ 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.
3/ Fix a bug that could cause mplayer to crash on exit if a "rtsp://" URL
was bad.
Ross.
--- mplayer.c.old Thu Aug 29 03:10:19 2002
+++ mplayer.c Thu Aug 29 03:10:50 2002
@@ -1032,7 +1032,7 @@
}
#endif
-if(stream_dump_type==5){
+if(stream_dump_type==5 && stream->fd >= 0){
unsigned char buf[4096];
int len;
FILE *f;
--- demux_rtp.cpp.old Thu Aug 29 02:16:51 2002
+++ demux_rtp.cpp Thu Aug 29 02:17:32 2002
@@ -111,7 +111,7 @@
char const* url = demuxer->stream->streaming_ctrl->url->url;
extern int verbose;
- rtspClient = RTSPClient::createNew(*env, verbose);
+ rtspClient = RTSPClient::createNew(*env, verbose, "mplayer");
if (rtspClient == NULL) {
fprintf(stderr, "Failed to create RTSP client: %s\n",
env->getResultMsg());
@@ -310,6 +310,8 @@
// Get the RTP state that was stored in the demuxer's 'priv' field:
RTPState* rtpState = (RTPState*)(demuxer->priv);
+ if (rtpState == NULL) return;
+
UsageEnvironment* env = NULL;
TaskScheduler* scheduler = NULL;
if (rtpState->mediaSession != NULL) {
More information about the MPlayer-dev-eng
mailing list