[MPlayer-dev-eng] Re: Some minor patches (for RTSP/RTP streaming)

Ross Finlayson finlayson at live.com
Fri Aug 30 00:42:39 CEST 2002


> > --- demux_rtp.cpp.old   Thu Aug 29 02:16:51 2002
> > +++ demux_rtp.cpp       Thu Aug 29 02:17:32 2002
>
>
>root at arpi:/demo/mplayer/main/libmpdemux# patch -p0 
></demo/mplayer/main/\!P/live.diff
>patching file demux_rtp.cpp
>Hunk #1 FAILED at 111.
>Hunk #2 FAILED at 310.
>2 out of 2 hunks FAILED -- saving rejects to file demux_rtp.cpp.rej

OK, sorry about that.  I chose a bad file naming convention.  Please try 
this instead:

--- mplayer.c       Thu Aug 29 03:10:19 2002
+++ mplayer.c.new   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   Thu Aug 29 02:16:51 2002
+++ demux_rtp.cpp.new       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