[MPlayer-dev-eng] Re: [PATCH] Repairing breakage to RTP streaming

Ross Finlayson finlayson at live.com
Thu Feb 13 00:11:28 CET 2003


Oops - you were right after all.  (I should never have doubted you :-)

I had forgotten to move the "#ifdef" that was at the start of my code.

Here's the corrected patch.

	Ross.
-------------- next part --------------
Index: libmpdemux/demux_rtp.cpp
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_rtp.cpp,v
retrieving revision 1.11
diff -u -r1.11 demux_rtp.cpp
--- libmpdemux/demux_rtp.cpp	9 Feb 2003 17:06:38 -0000	1.11
+++ libmpdemux/demux_rtp.cpp	12 Feb 2003 23:13:07 -0000
@@ -112,6 +112,9 @@
     RTSPClient* rtspClient = NULL;
     unsigned flags = 0;
 
+    if (demuxer == NULL || demuxer->stream == NULL) break;  // shouldn't happen
+    demuxer->stream->eof = 0; // just in case 
+
     // Look at the stream's 'priv' field to see if we were initiated
     // via a SDP description:
     char* sdpDescription = (char*)(demuxer->stream->priv);
Index: libmpdemux/video.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/video.c,v
retrieving revision 1.34
diff -u -r1.34 video.c
--- libmpdemux/video.c	2 Feb 2003 14:02:32 -0000	1.34
+++ libmpdemux/video.c	12 Feb 2003 23:13:08 -0000
@@ -82,13 +82,6 @@
 #endif
   break;
  }
-#ifdef STREAMING_LIVE_DOT_COM
- case DEMUXER_TYPE_RTP:
-   // If the RTP stream is a MPEG stream, then we use this code to check
-   // for MPEG headers:
-   if (!demux_is_mpeg_rtp_stream(d_video->demuxer)) break;
-   // otherwise fall through to...
-#endif
  case DEMUXER_TYPE_MPEG4_ES: {
    videobuf_len=0; videobuf_code_len=0;
    mp_msg(MSGT_DECVIDEO,MSGL_V,"Searching for Video Object Start code... ");fflush(stdout);
@@ -129,6 +122,13 @@
    sh_video->format=0x10000004;
    break;
  }
+#ifdef STREAMING_LIVE_DOT_COM
+ case DEMUXER_TYPE_RTP:
+   // If the RTP stream is a MPEG stream, then we use this code to check
+   // for MPEG headers:
+   if (!demux_is_mpeg_rtp_stream(d_video->demuxer)) break;
+   // otherwise fall through to...
+#endif
  case DEMUXER_TYPE_PVA:
  case DEMUXER_TYPE_MPEG_ES:
  case DEMUXER_TYPE_MPEG_PS: {


More information about the MPlayer-dev-eng mailing list