]> git.sesse.net Git - ffmpeg/commitdiff
Fix a crash when opening WMS RTSP streams
authorMartin Storsjö <martin@martin.st>
Wed, 19 May 2010 09:46:29 +0000 (09:46 +0000)
committerMartin Storsjö <martin@martin.st>
Wed, 19 May 2010 09:46:29 +0000 (09:46 +0000)
Fixes issue 1948

Originally committed as revision 23181 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/rtsp.c

index fec91f11b8af5e09768ec8118f5fa104c46bb2da..6dbd796d31bf6bc09ac163323df42f0f193ac8b8 100644 (file)
@@ -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;