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

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

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

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

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

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

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

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

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

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

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