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

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

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

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

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

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

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

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

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

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

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