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

libavformat/rtsp.c:521:1: start of procedure rtsp_open_transport_ctx()
519. }
520. 
521. static int rtsp_open_transport_ctx(AVFormatContext *s, RTSPStream *rtsp_st)
     ^
522. {
523.     RTSPState *rt = s->priv_data;

libavformat/rtsp.c:523:5: 
521. static int rtsp_open_transport_ctx(AVFormatContext *s, RTSPStream *rtsp_st)
522. {
523.     RTSPState *rt = s->priv_data;
         ^
524.     AVStream *st = NULL;
525. 

libavformat/rtsp.c:524:5: 
522. {
523.     RTSPState *rt = s->priv_data;
524.     AVStream *st = NULL;
         ^
525. 
526.     /* open the RTP context */

libavformat/rtsp.c:527:9: Taking false branch
525. 
526.     /* open the RTP context */
527.     if (rtsp_st->stream_index >= 0)
             ^
528.         st = s->streams[rtsp_st->stream_index];
529.     if (!st)

libavformat/rtsp.c:529:10: Taking true branch
527.     if (rtsp_st->stream_index >= 0)
528.         st = s->streams[rtsp_st->stream_index];
529.     if (!st)
              ^
530.         s->ctx_flags |= AVFMTCTX_NOHEADER;
531. 

libavformat/rtsp.c:530:9: 
528.         st = s->streams[rtsp_st->stream_index];
529.     if (!st)
530.         s->ctx_flags |= AVFMTCTX_NOHEADER;
             ^
531. 
532.     if (s->oformat && CONFIG_RTSP_MUXER) {

libavformat/rtsp.c:532:9: Taking false branch
530.         s->ctx_flags |= AVFMTCTX_NOHEADER;
531. 
532.     if (s->oformat && CONFIG_RTSP_MUXER) {
             ^
533.         rtsp_st->transport_priv = ff_rtp_chain_mux_open(s, st,
534.                                       rtsp_st->rtp_handle,

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

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

libavformat/rtsp.c:539:9: 
537.         rtsp_st->rtp_handle = NULL;
538.     } else if (rt->transport == RTSP_TRANSPORT_RDT && CONFIG_RTPDEC)
539.         rtsp_st->transport_priv = ff_rdt_parse_open(s, st->index,
             ^
540.                                             rtsp_st->dynamic_protocol_context,
541.                                             rtsp_st->dynamic_handler);
