[MPlayer-dev-eng] [PATCH] libbs2b audio filter

Andrew Savchenko bircoph at gmail.com
Mon Mar 23 19:30:46 CET 2009


Hi,

On Monday 23 March 2009 19:43, Uoti Urpala wrote:
> On Mon, 2009-03-23 at 18:27 +0300, Andrew Savchenko wrote:
> > IMO the best solution is to replace all occurences of
> > malloc/calloc/realloc to their safe wrappers, e.g.
> > xmalloc/xcalloc/xrealloc with return value check and fatal
> > error message and exit() call if NULL is returned; if sane
> > exit attempt is really necessary, signal may be issued and
> > later proceed by sighandler. I do not know why this approach
> > isn't used throughout all mplayer's code. Performance
> > shouldn't be an issue because
>
> I did add something like this (in the git repo).

Then why this is not added to the main svn tree? This is very good 
that someone cares about this issue, but it should be fixed not 
only somewhere locally, but at the mainstream. What about 
discussing this widely, preferrably in another thread? Are there 
any objections for this kind of change throughout all code?

> > > > +        opt_t subopts[] = {
> > >
> > > const
> >
> > I can't do this because initializers are not constant.
>
> You can still declare the table const since it doesn't change
> after being declared. The compiler will have to construct it on
> the stack rather than have a prepared table in read-only memory,
> but semantically it can be const for the duration it exists.

Oops, I confused static and const. Fixed.

-- 
Best regards,
Andrew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libbs2b-filter-v7.patch
Type: text/x-diff
Size: 7502 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20090323/48e8e22c/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20090323/48e8e22c/attachment.pgp>


More information about the MPlayer-dev-eng mailing list