summaryrefslogtreecommitdiff
path: root/libavformat/rtsp.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/rtsp.c')
-rw-r--r--libavformat/rtsp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index d3e88e9a5c..41427ae08e 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -322,7 +322,7 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1,
if (!strcmp(ff_rtp_enc_name(rtsp_st->sdp_payload_type), "MP2T")) {
/* no corresponding stream */
} else {
- st = av_new_stream(s, 0);
+ st = av_new_stream(s, rt->nb_rtsp_streams - 1);
if (!st)
return;
rtsp_st->stream_index = st->index;