lavf/mov: fix crash in mov_read_sidx
authorJohn Stebbins <jstebbins@jetheaddev.com>
Fri, 24 Nov 2017 16:18:16 +0000 (08:18 -0800)
committerMichael Niedermayer <michael@niedermayer.cc>
Sat, 25 Nov 2017 01:32:33 +0000 (02:32 +0100)
Use correct index into streams

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/mov.c

index f3e86df..ddb1e59 100644 (file)
@@ -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;
                 }