[FFmpeg-devel] [PATCH] Common code for Indeo interactive
Benjamin Larsson
banan
Tue Mar 24 16:43:21 CET 2009
Maxim wrote:
> [...]
>
>
>>> if (planes[0].buf1)
>>> av_free(planes[0].buf1);
>>>
>>>
>> /* allocate luma buffers (aligned on 16x16 for simplicity) */
>>
>> teh if is redundant
>>
>>
>
> Hm, this function used in both initial allocation as well as
> reallocation of the internal buffers. When it's called first time from
> "ivi5_decode_init" all pointers in the context are zero. Freeing memory
> without "if (ptr)"-guards is fatal in this case, isn't?
> An alternative to it could be to code this function with an additional
> parameter telling if it's an allocation or reallocation...
>
>
Use av_freep.
And I'll wait for the updated patch and then commit it to the soc repo.
MvH
Benjamin Larsson
More information about the ffmpeg-devel
mailing list