[FFmpeg-devel] [PATCH] mem: workaround alloc bug in OSX

Michael Niedermayer michaelni at gmx.at
Tue Feb 5 20:42:15 CET 2013


On Tue, Feb 05, 2013 at 07:17:43PM +0100, Reimar Döffinger wrote:
> On 5 Feb 2013, at 17:43, Michael Niedermayer <michaelni at gmx.at> wrote:
> > Fixes Ticket2229
> > 
> > Untested
> > 
> > Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> > ---
> > libavutil/mem.c |    1 +
> > 1 file changed, 1 insertion(+)
> > 
> > diff --git a/libavutil/mem.c b/libavutil/mem.c
> > index 250b5f7..e3572cd 100644
> > --- a/libavutil/mem.c
> > +++ b/libavutil/mem.c
> > @@ -120,6 +120,7 @@ void *av_malloc(size_t size)
> >      * BTW, malloc seems to do 8-byte alignment by default here.
> >      */
> > #else
> > +    if (size) //OS X has a broken malloc implementation
> >     ptr = malloc(size);
> 
> 
> I am fairly sure we had this before, then I think we made sure to never allocate anything of size 0 and thus removed it.

we have it in another branch of the #if / #else but somehow osx falls
in another one now


> I think we should make sure we're not repeating this back and forth forever, it's not a particularly good use of time.
> But otherwise I think it is ok.
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The misfortune of the wise is better than the prosperity of the fool.
-- Epicurus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130205/3e1678f8/attachment.asc>


More information about the ffmpeg-devel mailing list