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

libavformat/rtsp.c:511:1: start of procedure rtsp_open_transport_ctx()
509. }
510. 
511. static int rtsp_open_transport_ctx(AVFormatContext *s, RTSPStream *rtsp_st)
     ^
512. {
513.     RTSPState *rt = s->priv_data;

libavformat/rtsp.c:513:5: 
511. static int rtsp_open_transport_ctx(AVFormatContext *s, RTSPStream *rtsp_st)
512. {
513.     RTSPState *rt = s->priv_data;
         ^
514.     AVStream *st = NULL;
515. 

libavformat/rtsp.c:514:5: 
512. {
513.     RTSPState *rt = s->priv_data;
514.     AVStream *st = NULL;
         ^
515. 
516.     /* open the RTP context */

libavformat/rtsp.c:517:9: Taking false branch
515. 
516.     /* open the RTP context */
517.     if (rtsp_st->stream_index >= 0)
             ^
518.         st = s->streams[rtsp_st->stream_index];
519.     if (!st)

libavformat/rtsp.c:519:10: Taking true branch
517.     if (rtsp_st->stream_index >= 0)
518.         st = s->streams[rtsp_st->stream_index];
519.     if (!st)
              ^
520.         s->ctx_flags |= AVFMTCTX_NOHEADER;
521. 

libavformat/rtsp.c:520:9: 
518.         st = s->streams[rtsp_st->stream_index];
519.     if (!st)
520.         s->ctx_flags |= AVFMTCTX_NOHEADER;
             ^
521. 
522.     if (s->oformat && CONFIG_RTSP_MUXER) {

libavformat/rtsp.c:522:9: Taking false branch
520.         s->ctx_flags |= AVFMTCTX_NOHEADER;
521. 
522.     if (s->oformat && CONFIG_RTSP_MUXER) {
             ^
523.         rtsp_st->transport_priv = ff_rtp_chain_mux_open(s, st,
524.                                       rtsp_st->rtp_handle,

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

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

libavformat/rtsp.c:529:9: 
527.         rtsp_st->rtp_handle = NULL;
528.     } else if (rt->transport == RTSP_TRANSPORT_RDT && CONFIG_RTPDEC)
529.         rtsp_st->transport_priv = ff_rdt_parse_open(s, st->index,
             ^
530.                                             rtsp_st->dynamic_protocol_context,
531.                                             rtsp_st->dynamic_handler);
