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

libavformat/rtsp.c:842:1: start of procedure rtsp_open_transport_ctx()
840. }
841. 
842. static int
     ^
843. rtsp_open_transport_ctx(AVFormatContext *s, RTSPStream *rtsp_st)
844. {

libavformat/rtsp.c:845:5: 
843. rtsp_open_transport_ctx(AVFormatContext *s, RTSPStream *rtsp_st)
844. {
845.     RTSPState *rt = s->priv_data;
         ^
846.     AVStream *st = NULL;
847. 

libavformat/rtsp.c:846:5: 
844. {
845.     RTSPState *rt = s->priv_data;
846.     AVStream *st = NULL;
         ^
847. 
848.     /* open the RTP context */

libavformat/rtsp.c:849:9: Taking false branch
847. 
848.     /* open the RTP context */
849.     if (rtsp_st->stream_index >= 0)
             ^
850.         st = s->streams[rtsp_st->stream_index];
851.     if (!st)

libavformat/rtsp.c:851:10: Taking true branch
849.     if (rtsp_st->stream_index >= 0)
850.         st = s->streams[rtsp_st->stream_index];
851.     if (!st)
              ^
852.         s->ctx_flags |= AVFMTCTX_NOHEADER;
853. 

libavformat/rtsp.c:852:9: 
850.         st = s->streams[rtsp_st->stream_index];
851.     if (!st)
852.         s->ctx_flags |= AVFMTCTX_NOHEADER;
             ^
853. 
854.     if (rt->transport == RTSP_TRANSPORT_RDT)

libavformat/rtsp.c:854:9: Taking true branch
852.         s->ctx_flags |= AVFMTCTX_NOHEADER;
853. 
854.     if (rt->transport == RTSP_TRANSPORT_RDT)
             ^
855.         rtsp_st->tx_ctx = ff_rdt_parse_open(s, st->index,
856.                                             rtsp_st->dynamic_protocol_context,

libavformat/rtsp.c:855:9: 
853. 
854.     if (rt->transport == RTSP_TRANSPORT_RDT)
855.         rtsp_st->tx_ctx = ff_rdt_parse_open(s, st->index,
             ^
856.                                             rtsp_st->dynamic_protocol_context,
857.                                             rtsp_st->dynamic_handler);
