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

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

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

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

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

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

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

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

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

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