libavformat/rtsp.c:578: error: Null Dereference
  pointer `st` last assigned on line 565 could be null and is dereferenced at line 578, column 56.

libavformat/rtsp.c:562:1: start of procedure rtsp_open_transport_ctx()
560. }
561. 
562. static int rtsp_open_transport_ctx(AVFormatContext *s, RTSPStream *rtsp_st)
     ^
563. {
564.     RTSPState *rt = s->priv_data;

libavformat/rtsp.c:564:5: 
562. static int rtsp_open_transport_ctx(AVFormatContext *s, RTSPStream *rtsp_st)
563. {
564.     RTSPState *rt = s->priv_data;
         ^
565.     AVStream *st = NULL;
566. 

libavformat/rtsp.c:565:5: 
563. {
564.     RTSPState *rt = s->priv_data;
565.     AVStream *st = NULL;
         ^
566. 
567.     /* open the RTP context */

libavformat/rtsp.c:568:9: Taking false branch
566. 
567.     /* open the RTP context */
568.     if (rtsp_st->stream_index >= 0)
             ^
569.         st = s->streams[rtsp_st->stream_index];
570.     if (!st)

libavformat/rtsp.c:570:10: Taking true branch
568.     if (rtsp_st->stream_index >= 0)
569.         st = s->streams[rtsp_st->stream_index];
570.     if (!st)
              ^
571.         s->ctx_flags |= AVFMTCTX_NOHEADER;
572. 

libavformat/rtsp.c:571:9: 
569.         st = s->streams[rtsp_st->stream_index];
570.     if (!st)
571.         s->ctx_flags |= AVFMTCTX_NOHEADER;
             ^
572. 
573.     if (s->oformat) {

libavformat/rtsp.c:573:9: Taking false branch
571.         s->ctx_flags |= AVFMTCTX_NOHEADER;
572. 
573.     if (s->oformat) {
             ^
574.         rtsp_st->transport_priv = rtsp_rtp_mux_open(s, st, rtsp_st->rtp_handle);
575.         /* Ownership of rtp_handle is passed to the rtp mux context */

libavformat/rtsp.c:577:16: Taking true branch
575.         /* Ownership of rtp_handle is passed to the rtp mux context */
576.         rtsp_st->rtp_handle = NULL;
577.     } else if (rt->transport == RTSP_TRANSPORT_RDT)
                    ^
578.         rtsp_st->transport_priv = ff_rdt_parse_open(s, st->index,
579.                                             rtsp_st->dynamic_protocol_context,

libavformat/rtsp.c:578:9: 
576.         rtsp_st->rtp_handle = NULL;
577.     } else if (rt->transport == RTSP_TRANSPORT_RDT)
578.         rtsp_st->transport_priv = ff_rdt_parse_open(s, st->index,
             ^
579.                                             rtsp_st->dynamic_protocol_context,
580.                                             rtsp_st->dynamic_handler);
