summaryrefslogtreecommitdiffstats
path: root/libmpdemux
diff options
context:
space:
mode:
authorbertrand <bertrand@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-02-18 22:33:44 +0000
committerbertrand <bertrand@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-02-18 22:33:44 +0000
commit12322d251789f25475ac07e32fe3a0ed996660bd (patch)
tree540d42d8f16a210e8e32fbf5479698ea4532c614 /libmpdemux
parent14c4084899008c9d2a9dae341fde10d5db9f3a53 (diff)
downloadmpv-12322d251789f25475ac07e32fe3a0ed996660bd.tar.bz2
mpv-12322d251789f25475ac07e32fe3a0ed996660bd.tar.xz
Repairing breakage to RTP streaming. Patch by Ross Finlayson <finlayson@live.com>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9458 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r--libmpdemux/demux_rtp.cpp3
-rw-r--r--libmpdemux/video.c18
2 files changed, 14 insertions, 7 deletions
diff --git a/libmpdemux/demux_rtp.cpp b/libmpdemux/demux_rtp.cpp
index 75cf85e78e..f6165f4b19 100644
--- a/libmpdemux/demux_rtp.cpp
+++ b/libmpdemux/demux_rtp.cpp
@@ -112,6 +112,9 @@ extern "C" void demux_open_rtp(demuxer_t* demuxer) {
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);
diff --git a/libmpdemux/video.c b/libmpdemux/video.c
index ead63acd0f..5871bbe1f8 100644
--- a/libmpdemux/video.c
+++ b/libmpdemux/video.c
@@ -25,6 +25,10 @@
/* biCompression constant */
#define BI_RGB 0L
+#ifdef STREAMING_LIVE_DOT_COM
+#include "demux_rtp.h"
+#endif
+
static mp_mpeg_header_t picture;
static int telecine=0;
@@ -82,13 +86,6 @@ switch(d_video->demuxer->file_format){
#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 +126,13 @@ switch(d_video->demuxer->file_format){
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: {