On 26.05.2015 15:58, Vittorio Giovara wrote:
> On Tue, May 26, 2015 at 2:39 PM, Luca Barbato <lu_z...@gentoo.org> wrote:
>> On 26/05/15 15:24, Vittorio Giovara wrote:
>>>
>>> From: Andreas Cadhalpun <andreas.cadhal...@googlemail.com>
>>>
>>> Signed-off-by: Andreas Cadhalpun <andreas.cadhal...@googlemail.com>
>>> ---
>>>   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?

I'm not sure what's worse: Having the old one or having none.
I'm fine with either way.

Best regards,
Andreas


_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to