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

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

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

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

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

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

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

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

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