[MPlayer-cvslog] r32906 - trunk/gui/skin/font.c

Ingo Brückl ib at wupperonline.de
Wed Feb 16 17:04:01 CET 2011


Clément Boesch wrote on Wed, 16 Feb 2011 16:38:34 +0100:

> What about using av_malloc and av_free/av_freep?

Didn't know about these. (I hardly know the gui stuff yet.)

If the gui stuff at some point will be separated from MPlayer there should
not be too much dependencies, so I think it's best not to use these for the
moment.

>> +#include "../interface.h"

> Shouldn't this fixed adding the correct -I?

Yes, you're right. I'll change this.

> I know this is not relative to the current patch, but:

>    bmpFont *Fonts[MAX_FONTS] = {0};

> is enough.

Thanks for mentioning. I wasn't aware of that. <shame>
(Is that C standard or a compiler feature?)

>> +     gfree( (void **) &Fonts[i] );

> The cast seems useless (yes I know it's like that everywhere).

As there is no generic pointer-to-pointer type in C, it's to avoid a warning
without explicit cast.

>>            if (Fonts[id]->Bitmap.Image)
>> +            gfree((void **) &Fonts[id]->Bitmap.Image);

> The if looks pointless:

Yes, you're right.

Thanks for looking over the patch.

Ingo


More information about the MPlayer-cvslog mailing list