[FFmpeg-cvslog] avformat/rtsp: Use rtsp_st->stream_index

Michael Niedermayer git at videolan.org
Fri Dec 22 01:53:28 EET 2023


ffmpeg | branch: release/4.4 | Michael Niedermayer <michael at niedermayer.cc> | Thu Oct 19 22:07:36 2023 +0200| [d8a3d7b4f91249b1ff02d4474c78111b8688d605] | committer: Michael Niedermayer

avformat/rtsp: Use rtsp_st->stream_index

Fixes: out of array access
Fixes: rtpdec_h264.c149/poc

Found-by: Hardik Shah of Vehere
Reviewed-by: Martin Storsjö <martin at martin.st>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit e4d5ac8d7d2a08658b3db7dd821246fe6b35381f)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d8a3d7b4f91249b1ff02d4474c78111b8688d605
---

 libavformat/rtsp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index fae3a371e0..bec3c3d281 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -412,7 +412,7 @@ static void parse_fmtp(AVFormatContext *s, RTSPState *rt,
         if (rtsp_st->sdp_payload_type == payload_type &&
             rtsp_st->dynamic_handler &&
             rtsp_st->dynamic_handler->parse_sdp_a_line) {
-            rtsp_st->dynamic_handler->parse_sdp_a_line(s, i,
+            rtsp_st->dynamic_handler->parse_sdp_a_line(s, rtsp_st->stream_index,
                 rtsp_st->dynamic_protocol_context, line);
         }
     }



More information about the ffmpeg-cvslog mailing list