libavformat/rtsp.c:561: error: Null Dereference
  pointer `st` last assigned on line 546 could be null and is dereferenced at line 561, 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 && CONFIG_RTSP_MUXER) {

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

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

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

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