# HG changeset patch # User bertrand # Date 1045607624 0 # Node ID ea1c0a4520bf9bbf3ab4cc9dcb8c52816756f069 # Parent 89e4b57cc59e76a83318d828dcfd084e08dc3f99 Repairing breakage to RTP streaming. Patch by Ross Finlayson diff -r 89e4b57cc59e -r ea1c0a4520bf libmpdemux/demux_rtp.cpp --- a/libmpdemux/demux_rtp.cpp Tue Feb 18 21:57:51 2003 +0000 +++ b/libmpdemux/demux_rtp.cpp Tue Feb 18 22:33:44 2003 +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); diff -r 89e4b57cc59e -r ea1c0a4520bf libmpdemux/video.c --- a/libmpdemux/video.c Tue Feb 18 21:57:51 2003 +0000 +++ b/libmpdemux/video.c Tue Feb 18 22:33:44 2003 +0000 @@ -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 @@ #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 @@ 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: {