On 12/02/2019 22:28, Michael Niedermayer wrote: > @@ -5048,7 +5048,7 @@ static int mov_read_sidx(MOVContext *c, AVIOContext > *pb, MOVAtom atom) > for (i = 0; i < c->fc->nb_streams; i++) { > st = c->fc->streams[i]; > sc = st->priv_data; > - if (!sc->has_sidx) { > + if (ref_st && !sc->has_sidx) { > st->duration = sc->track_end = av_rescale(ref_st->duration, > sc->time_scale, ref_sc->time_scale); > } > }
Is it perhaps better to not run this loop at all if ref_sc or ref_st do not exist? - Derek _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel