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

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

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

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

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

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

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

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

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

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