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

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

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

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

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

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

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

libavformat/rtsp.c:553:9: Taking false branch
551.         s->ctx_flags |= AVFMTCTX_NOHEADER;
552. 
553.     if (s->oformat && CONFIG_RTSP_MUXER) {
             ^
554.         rtsp_st->transport_priv = ff_rtp_chain_mux_open(s, st,
555.                                       rtsp_st->rtp_handle,

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 && CONFIG_RTPDEC)
                    ^
560.         rtsp_st->transport_priv = ff_rdt_parse_open(s, st->index,
561.                                             rtsp_st->dynamic_protocol_context,

libavformat/rtsp.c:559:55: 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 && CONFIG_RTPDEC)
                                                           ^
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 && CONFIG_RTPDEC)
560.         rtsp_st->transport_priv = ff_rdt_parse_open(s, st->index,
             ^
561.                                             rtsp_st->dynamic_protocol_context,
562.                                             rtsp_st->dynamic_handler);
