[MPlayer-dev-eng] [PATCH] Direct3D libvo driver

Georgi Petrov gogothebee at gmail.com
Thu Nov 20 09:50:56 CET 2008


>+    if (vo_panscan_x != 0 || vo_panscan_y != 0){
>
>There should preferably be a space before the opening brace. Basically
>standard K & R indentation style. Though at least to me this makes less
>difference than the issues I mentioned earlier.

Fixed everywhere.

>> +} *priv = NULL;
>
> And you can drop the = NULL, global variables are always initialized to
> 0 (and NULL is 0, even though the binary pattern of (int)0 and (void *)0
> is allowed to differ).
>

Fixed.

> I know, I took the effort to look through it.

Thanks.

> There is also a mp_msg before that that is new which preferably should
> not be in a (mostly) cosmetics patch.
> Also please use calloc to get zeroed memory instead of malloc+memset.

Fixed.

>
>> ...and in uninit:
>>
>>     if (priv)
>>         free (priv);
>
> While I sometimes use such constructs for documentation purposes, it is
> never necessary (free accepts NULL) and it gives the wrong impression
> (there is not really any way prov should ever be NULL here).
> Maybe setting priv = NULL afterwards just to be safe would be a good
> idea though.
>

Fixed.

>There is also a mp_msg before that that is new which preferably should
>not be in a (mostly) cosmetics patch.

Fixed.

I attach the updated patch.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: direct3d.txt
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20081120/d5e93387/attachment.txt>


More information about the MPlayer-dev-eng mailing list