On Sat, Feb 2, 2019 at 3:55 AM Michael Niedermayer <mich...@niedermayer.cc> wrote:
> > static inline int64_t mov_get_stsc_samples(MOVStreamContext *sc, > unsigned int index) > > { > > - int chunk_count; > > + unsigned int chunk_count = 0; > > > > if (mov_stsc_index_valid(index, sc->stsc_count)) > > chunk_count = sc->stsc_data[index + 1].first - > sc->stsc_data[index].first; > > - else > > + else if (sc->chunk_count >= sc->stsc_data[index].first) > > chunk_count = sc->chunk_count - (sc->stsc_data[index].first - > 1); > > This construct occurs a 2nd time (in mov_build_index()) is this not > affected? > Didn't notice it, but I think it would be affected. I'll leave this alone for now, but I'm open to adding a mov_get_chunk_count helper to call from both mov_build_index and mov_get_stsc_samples. > mov_read_trak() contains a check for chunk_count and the first index(es) > (obviously this is not catching this one but) > is there a reason not to eliminate the inconsistancy at that or some other > "early" point? > Agree this sounds better. Stand by for patch. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel