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

libavformat/rtsp.c:544:1: start of procedure rtsp_open_transport_ctx()
542. }
543. 
544. static int rtsp_open_transport_ctx(AVFormatContext *s, RTSPStream *rtsp_st)
     ^
545. {
546.     RTSPState *rt = s->priv_data;

libavformat/rtsp.c:546:5: 
544. static int rtsp_open_transport_ctx(AVFormatContext *s, RTSPStream *rtsp_st)
545. {
546.     RTSPState *rt = s->priv_data;
         ^
547.     AVStream *st = NULL;
548. 

libavformat/rtsp.c:547:5: 
545. {
546.     RTSPState *rt = s->priv_data;
547.     AVStream *st = NULL;
         ^
548. 
549.     /* open the RTP context */

libavformat/rtsp.c:550:9: Taking false branch
548. 
549.     /* open the RTP context */
550.     if (rtsp_st->stream_index >= 0)
             ^
551.         st = s->streams[rtsp_st->stream_index];
552.     if (!st)

libavformat/rtsp.c:552:10: Taking true branch
550.     if (rtsp_st->stream_index >= 0)
551.         st = s->streams[rtsp_st->stream_index];
552.     if (!st)
              ^
553.         s->ctx_flags |= AVFMTCTX_NOHEADER;
554. 

libavformat/rtsp.c:553:9: 
551.         st = s->streams[rtsp_st->stream_index];
552.     if (!st)
553.         s->ctx_flags |= AVFMTCTX_NOHEADER;
             ^
554. 
555.     if (s->oformat) {

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

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

libavformat/rtsp.c:560:9: 
558.         rtsp_st->rtp_handle = NULL;
559.     } else if (rt->transport == RTSP_TRANSPORT_RDT)
560.         rtsp_st->transport_priv = ff_rdt_parse_open(s, st->index,
             ^
561.                                             rtsp_st->dynamic_protocol_context,
562.                                             rtsp_st->dynamic_handler);
