From 3588e6b7c5327eb0831d1b0fc4baf2ce96566b98 Mon Sep 17 00:00:00 2001 From: Reinhard Tartler Date: Fri, 21 May 2010 20:22:18 +0000 Subject: [PATCH] Fix a crash when opening WMS RTSP streams Fixes issue 1948 backport r23181 by mstorsjo Originally committed as revision 23228 to svn://svn.ffmpeg.org/ffmpeg/branches/0.6 --- libavformat/rtsp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index fec91f11b8..6dbd796d31 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -1337,6 +1337,8 @@ static int rtsp_read_play(AVFormatContext *s) RTSPStream *rtsp_st = rt->rtsp_streams[i]; RTPDemuxContext *rtpctx = rtsp_st->transport_priv; AVStream *st = NULL; + if (!rtpctx) + continue; if (rtsp_st->stream_index >= 0) st = s->streams[rtsp_st->stream_index]; rtpctx->last_rtcp_ntp_time = AV_NOPTS_VALUE;