[FFmpeg-devel] [PATCH] lavf/mov: fix crash in mov_read_sidx

John Stebbins jstebbins at jetheaddev.com
Fri Nov 24 18:18:16 EET 2017


Use correct index into streams
---
 libavformat/mov.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index f3e86dfc6d..ddb1e59b85 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -4816,7 +4816,7 @@ static int mov_read_sidx(MOVContext *c, AVIOContext *pb, MOVAtom atom)
                 MOVFragmentStreamInfo * si;
                 si = &item->stream_info[j];
                 if (si->sidx_pts != AV_NOPTS_VALUE) {
-                    ref_st = c->fc->streams[i];
+                    ref_st = c->fc->streams[j];
                     ref_sc = ref_st->priv_data;
                     break;
                 }
-- 
2.14.3



More information about the ffmpeg-devel mailing list