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

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

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

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

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

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

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

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

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

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