[MPlayer-dev-eng] Re: [PATCH] AM_MEDIA_TYPE related utils

Alan Nisota alannisota at gmail.com
Sun Feb 11 08:14:25 CET 2007


Vladimir Voroshilov <voroshil <at> gmail.com> writes:

> 
> Hi, All
> 
> I suggest to add CreateMediaType,CopyMediaType,FreeMediaType and
> DeleteMediaType. This will simplify loader/dshow code a little and
> also prevent various memory leak issues related to AM_MEDIA_TYPE
> operations.
> 
> I didnt add them to win32.c, because win32.c linkage occures only
> under *nix, but this methods will be usefull under win32 too.
> 
> Attached patch adds files util.c and util.h. They could be also used
> for adding another OS independent routines in future.
> 
> Changes in code for using new routines will be added as separate patch
> if devs will accept this.
> 
I am concerned about this patch.  Did you use mtype.cpp from the DirectX SDK as 
a basis?  I have looked at that file (and as such would not feel comfortable 
writing these functions), and your implementation looks almost identical to 
Microsoft's.  Maybe there is no other way to write the code in question (though 
if I had written the functions based purely off MSDN, I would not have written 
them as you did), but the structure of yours is very much the same as theirs, 
and I do not think Microsoft's DirectX SDK license is compatible with the GPL.  
I would advise caution in applying this patch.








More information about the MPlayer-dev-eng mailing list