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

Andrew Savchenko bircoph at gmail.com
Sat Mar 28 23:09:31 CET 2009


Hi,

On Saturday 28 March 2009 16:14, Uoti Urpala wrote:
[...]
> > > Add a special return value to the API that at best avoids a
> > > single line of additional code when it's used? I think
> > > that's clearly a bad tradeoff. If the filter wants uninit()
> > > called then it can call that itself before returning.
> >
> > You definitely misread my message. Where you can see single
> > additional line? Without function call described above whole
> > uninit function will be actually duplicated after the goto's
> > label.
>
> As far as I can tell I did not misread your message, but you did
> not understand what I said. What I meant was that at best your
> "special error code" suggestion turns "uninit(); return ERROR;"
> into "return MAGIC_ERROR_CODE;".

Nope, my idea differs, maybe my original explanation was unclear.
I do not propose to call uninit in each filter before return.
I propose to modify filter initializer in af.c, thus this will be 
single modification affects all filters at once, e.g.:

err=new->info->open(new);
if (err == AF_FATAL)
	new->info->uninit(new);
else {
	//...
}

-- 
Best regards,
Andrew
-------------- 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/20090329/a01dd81c/attachment.pgp>


More information about the MPlayer-dev-eng mailing list