[Ffmpeg-devel] [PATCH] Redundant memset

Rich Felker dalias
Fri Sep 8 16:35:06 CEST 2006


On Fri, Sep 08, 2006 at 10:32:27AM +0200, Michael Niedermayer wrote:
> Hi
> 
> On Fri, Sep 08, 2006 at 10:11:22AM +0200, Panagiotis Issaris wrote:
> > Hi,
> > 
> > The attached patch removes a redundant memset from libavformat. The memory is
> > cleared with memset although it had been previously allocated with av_mallocz
> > and thus was already cleared. The function avformat_get_context_defaults()
> > is only used from av_alloc_format_context().
> 
> if so then id say add a static under
> #if LIBAVCODEC_VERSION_INT > ...
> so it dissapears when we next do a compatibility breaking change

Isn't it supposed to be possible for the caller to setup the struct
without asking lavf to allocate it?

Rich





More information about the ffmpeg-devel mailing list