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

libavformat/rtsp.c:655:1: start of procedure rtsp_open_transport_ctx()
653. }
654. 
655. static int rtsp_open_transport_ctx(AVFormatContext *s, RTSPStream *rtsp_st)
     ^
656. {
657.     RTSPState *rt = s->priv_data;

libavformat/rtsp.c:657:5: 
655. static int rtsp_open_transport_ctx(AVFormatContext *s, RTSPStream *rtsp_st)
656. {
657.     RTSPState *rt = s->priv_data;
         ^
658.     AVStream *st = NULL;
659. 

libavformat/rtsp.c:658:5: 
656. {
657.     RTSPState *rt = s->priv_data;
658.     AVStream *st = NULL;
         ^
659. 
660.     /* open the RTP context */

libavformat/rtsp.c:661:9: Taking false branch
659. 
660.     /* open the RTP context */
661.     if (rtsp_st->stream_index >= 0)
             ^
662.         st = s->streams[rtsp_st->stream_index];
663.     if (!st)

libavformat/rtsp.c:663:10: Taking true branch
661.     if (rtsp_st->stream_index >= 0)
662.         st = s->streams[rtsp_st->stream_index];
663.     if (!st)
              ^
664.         s->ctx_flags |= AVFMTCTX_NOHEADER;
665. 

libavformat/rtsp.c:664:9: 
662.         st = s->streams[rtsp_st->stream_index];
663.     if (!st)
664.         s->ctx_flags |= AVFMTCTX_NOHEADER;
             ^
665. 
666.     if (s->oformat) {

libavformat/rtsp.c:666:9: Taking false branch
664.         s->ctx_flags |= AVFMTCTX_NOHEADER;
665. 
666.     if (s->oformat) {
             ^
667.         rtsp_st->transport_priv = rtsp_rtp_mux_open(s, st, rtsp_st->rtp_handle);
668.         /* Ownage of rtp_handle is passed to the rtp mux context */

libavformat/rtsp.c:670:16: Taking true branch
668.         /* Ownage of rtp_handle is passed to the rtp mux context */
669.         rtsp_st->rtp_handle = NULL;
670.     } else if (rt->transport == RTSP_TRANSPORT_RDT)
                    ^
671.         rtsp_st->transport_priv = ff_rdt_parse_open(s, st->index,
672.                                             rtsp_st->dynamic_protocol_context,

libavformat/rtsp.c:671:9: 
669.         rtsp_st->rtp_handle = NULL;
670.     } else if (rt->transport == RTSP_TRANSPORT_RDT)
671.         rtsp_st->transport_priv = ff_rdt_parse_open(s, st->index,
             ^
672.                                             rtsp_st->dynamic_protocol_context,
673.                                             rtsp_st->dynamic_handler);
