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

libavformat/rtsp.c:556:1: start of procedure rtsp_open_transport_ctx()
554. }
555. 
556. static int rtsp_open_transport_ctx(AVFormatContext *s, RTSPStream *rtsp_st)
     ^
557. {
558.     RTSPState *rt = s->priv_data;

libavformat/rtsp.c:558:5: 
556. static int rtsp_open_transport_ctx(AVFormatContext *s, RTSPStream *rtsp_st)
557. {
558.     RTSPState *rt = s->priv_data;
         ^
559.     AVStream *st = NULL;
560. 

libavformat/rtsp.c:559:5: 
557. {
558.     RTSPState *rt = s->priv_data;
559.     AVStream *st = NULL;
         ^
560. 
561.     /* open the RTP context */

libavformat/rtsp.c:562:9: Taking false branch
560. 
561.     /* open the RTP context */
562.     if (rtsp_st->stream_index >= 0)
             ^
563.         st = s->streams[rtsp_st->stream_index];
564.     if (!st)

libavformat/rtsp.c:564:10: Taking true branch
562.     if (rtsp_st->stream_index >= 0)
563.         st = s->streams[rtsp_st->stream_index];
564.     if (!st)
              ^
565.         s->ctx_flags |= AVFMTCTX_NOHEADER;
566. 

libavformat/rtsp.c:565:9: 
563.         st = s->streams[rtsp_st->stream_index];
564.     if (!st)
565.         s->ctx_flags |= AVFMTCTX_NOHEADER;
             ^
566. 
567.     if (s->oformat) {

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

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

libavformat/rtsp.c:572:9: 
570.         rtsp_st->rtp_handle = NULL;
571.     } else if (rt->transport == RTSP_TRANSPORT_RDT)
572.         rtsp_st->transport_priv = ff_rdt_parse_open(s, st->index,
             ^
573.                                             rtsp_st->dynamic_protocol_context,
574.                                             rtsp_st->dynamic_handler);
