summaryrefslogtreecommitdiffstats
path: root/libmpdemux/demux_rtp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libmpdemux/demux_rtp.cpp')
-rw-r--r--libmpdemux/demux_rtp.cpp3
1 files changed, 3 insertions, 0 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);