[MPlayer-dev-eng] [PATCH] Remove all usage of memalign.

Reimar Döffinger Reimar.Doeffinger at gmx.de
Fri Jun 12 00:49:06 EEST 2020


On Thu, Jun 11, 2020 at 01:06:32PM +0200, Erik Auerswald wrote:
> Grepping the sources, one instance of memalign seems to be left in
> the file "libvo/vo_vesa.c":

Yes, I corrected the commit message locally:

Remove usage of memalign.

Switch to av_malloc instead.
Only vo_vesa remains using memalign as it requests 64-byte alignment,
which is more than av_malloc provides.
The fallback for memalign has been plain malloc, which meant crashes
on e.g. Win32 where malloc is not sufficiently aligned.


That said I am not sure vo_vesa needs vbe.h which I don't think is
available on Windows, and I don't think any modern Linux distribution
has it anymore either.

> I was curious about "TOOLS/checktree.sh".  As I understand it, there
> is no need to remove "memalign" from there.  The tool does report
> something, though:
> 
>      $ ./TOOLS/checktree.sh
>      checking for spaces in filenames ...
>      checking for uppercase extensions ...
>      checking for MSDOS line endings ...
>      ./vidix/dhahelperwin/common.ver
>      ./vidix/dhahelperwin/ntverp.h
> 
> While this seems to pertain to Windows, the other files inside the
> directory "vidix/dhahelperwin/" use UNIX line endings:
> 
>      $ file *
>      common.ver:   C source, ASCII text, with CRLF line terminators
>      dhahelper.c:  C source, ASCII text
>      dhahelper.h:  C source, ASCII text
>      dhahelper.rc: C source, ASCII text
>      dhasetup.c:   C source, ASCII text
>      NMAKEFILE:    ASCII text
>      ntverp.h:     C source, ASCII text, with CRLF line terminators
>      SOURCES:      ASCII text

common.ver almost certainly needs to use CRLF to work properly.
ntverp.h is probably a verbatim copy from ReactOS.
So that's fine, except that I doubt there are many computers
still alive that have the slightest chance of running vidix these
days, so it's likely mostly pointless cruft anyway.


More information about the MPlayer-dev-eng mailing list