On Tue, May 26, 2015 at 2:39 PM, Luca Barbato <[email protected]> wrote: > On 26/05/15 15:24, Vittorio Giovara wrote: >> >> From: Andreas Cadhalpun <[email protected]> >> >> Signed-off-by: Andreas Cadhalpun <[email protected]> >> --- >> libavformat/mov.c | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >> >> diff --git a/libavformat/mov.c b/libavformat/mov.c >> index a965328..99f57ec 100644 >> --- a/libavformat/mov.c >> +++ b/libavformat/mov.c >> @@ -1942,10 +1942,11 @@ static int mov_read_stsz(MOVContext *c, >> AVIOContext *pb, MOVAtom atom) >> >> sc->sample_count = i; >> >> + av_free(buf); >> + >> if (pb->eof_reached) >> return AVERROR_EOF; >> >> - av_free(buf); >> return 0; >> } >> >> @@ -2038,6 +2039,7 @@ static int mov_read_ctts(MOVContext *c, AVIOContext >> *pb, MOVAtom atom) >> return 0; >> if (entries >= UINT_MAX / sizeof(*sc->ctts_data)) >> return AVERROR_INVALIDDATA; >> + av_freep(&sc->ctts_data); > > > shouldn't go above ? > > The idea is to reset the ctts at the start so that if you fail to get the > new one you aren't using the previous I think.
Probably. Andreas, what do you say? -- Vittorio _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
