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

Ross Finlayson finlayson at live.com
Wed Feb 12 04:58:15 CET 2003


Recent changes to the rest of MPlayer inadvertently broke the LIVE.COM RTP 
streaming support in a couple of cases (reading SDP files, and MPEG video 
streams).  This patch fixes this.

	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 03:35:08 -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 03:35:08 -0000
@@ -83,12 +83,6 @@
   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 +123,12 @@
    sh_video->format=0x10000004;
    break;
  }
+ 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