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

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

libavformat/rtsp.c:539:5: 
537. static int rtsp_open_transport_ctx(AVFormatContext *s, RTSPStream *rtsp_st)
538. {
539.     RTSPState *rt = s->priv_data;
         ^
540.     AVStream *st = NULL;
541. 

libavformat/rtsp.c:540:5: 
538. {
539.     RTSPState *rt = s->priv_data;
540.     AVStream *st = NULL;
         ^
541. 
542.     /* open the RTP context */

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

libavformat/rtsp.c:545:10: Taking true branch
543.     if (rtsp_st->stream_index >= 0)
544.         st = s->streams[rtsp_st->stream_index];
545.     if (!st)
              ^
546.         s->ctx_flags |= AVFMTCTX_NOHEADER;
547. 

libavformat/rtsp.c:546:9: 
544.         st = s->streams[rtsp_st->stream_index];
545.     if (!st)
546.         s->ctx_flags |= AVFMTCTX_NOHEADER;
             ^
547. 
548.     if (s->oformat && CONFIG_RTSP_MUXER) {

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

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

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

libavformat/rtsp.c:555:9: 
553.         rtsp_st->rtp_handle = NULL;
554.     } else if (rt->transport == RTSP_TRANSPORT_RDT && CONFIG_RTPDEC)
555.         rtsp_st->transport_priv = ff_rdt_parse_open(s, st->index,
             ^
556.                                             rtsp_st->dynamic_protocol_context,
557.                                             rtsp_st->dynamic_handler);
