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

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

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

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

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

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

libavformat/rtsp.c:556:9: 
554.         st = s->streams[rtsp_st->stream_index];
555.     if (!st)
556.         s->ctx_flags |= AVFMTCTX_NOHEADER;
             ^
557. 
558.     if (s->oformat && CONFIG_RTSP_MUXER) {

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

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

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

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