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

libavformat/rtsp.c:662:1: start of procedure rtsp_open_transport_ctx()
660. }
661. 
662. static int rtsp_open_transport_ctx(AVFormatContext *s, RTSPStream *rtsp_st)
     ^
663. {
664.     RTSPState *rt = s->priv_data;

libavformat/rtsp.c:664:5: 
662. static int rtsp_open_transport_ctx(AVFormatContext *s, RTSPStream *rtsp_st)
663. {
664.     RTSPState *rt = s->priv_data;
         ^
665.     AVStream *st = NULL;
666. 

libavformat/rtsp.c:665:5: 
663. {
664.     RTSPState *rt = s->priv_data;
665.     AVStream *st = NULL;
         ^
666. 
667.     /* open the RTP context */

libavformat/rtsp.c:668:9: Taking false branch
666. 
667.     /* open the RTP context */
668.     if (rtsp_st->stream_index >= 0)
             ^
669.         st = s->streams[rtsp_st->stream_index];
670.     if (!st)

libavformat/rtsp.c:670:10: Taking true branch
668.     if (rtsp_st->stream_index >= 0)
669.         st = s->streams[rtsp_st->stream_index];
670.     if (!st)
              ^
671.         s->ctx_flags |= AVFMTCTX_NOHEADER;
672. 

libavformat/rtsp.c:671:9: 
669.         st = s->streams[rtsp_st->stream_index];
670.     if (!st)
671.         s->ctx_flags |= AVFMTCTX_NOHEADER;
             ^
672. 
673.     if (s->oformat) {

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

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

libavformat/rtsp.c:678:9: 
676.         rtsp_st->rtp_handle = NULL;
677.     } else if (rt->transport == RTSP_TRANSPORT_RDT)
678.         rtsp_st->transport_priv = ff_rdt_parse_open(s, st->index,
             ^
679.                                             rtsp_st->dynamic_protocol_context,
680.                                             rtsp_st->dynamic_handler);
