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

libavformat/rtsp.c:682:1: start of procedure rtsp_open_transport_ctx()
680. }
681. 
682. static int rtsp_open_transport_ctx(AVFormatContext *s, RTSPStream *rtsp_st)
     ^
683. {
684.     RTSPState *rt = s->priv_data;

libavformat/rtsp.c:684:5: 
682. static int rtsp_open_transport_ctx(AVFormatContext *s, RTSPStream *rtsp_st)
683. {
684.     RTSPState *rt = s->priv_data;
         ^
685.     AVStream *st = NULL;
686. 

libavformat/rtsp.c:685:5: 
683. {
684.     RTSPState *rt = s->priv_data;
685.     AVStream *st = NULL;
         ^
686. 
687.     /* open the RTP context */

libavformat/rtsp.c:688:9: Taking false branch
686. 
687.     /* open the RTP context */
688.     if (rtsp_st->stream_index >= 0)
             ^
689.         st = s->streams[rtsp_st->stream_index];
690.     if (!st)

libavformat/rtsp.c:690:10: Taking true branch
688.     if (rtsp_st->stream_index >= 0)
689.         st = s->streams[rtsp_st->stream_index];
690.     if (!st)
              ^
691.         s->ctx_flags |= AVFMTCTX_NOHEADER;
692. 

libavformat/rtsp.c:691:9: 
689.         st = s->streams[rtsp_st->stream_index];
690.     if (!st)
691.         s->ctx_flags |= AVFMTCTX_NOHEADER;
             ^
692. 
693.     if (s->oformat) {

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

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

libavformat/rtsp.c:698:9: 
696.         rtsp_st->rtp_handle = NULL;
697.     } else if (rt->transport == RTSP_TRANSPORT_RDT)
698.         rtsp_st->transport_priv = ff_rdt_parse_open(s, st->index,
             ^
699.                                             rtsp_st->dynamic_protocol_context,
700.                                             rtsp_st->dynamic_handler);
