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

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

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

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

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

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

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

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

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

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