[MPlayer-cvslog] r29026 - trunk/libvo/vo_vdpau.c

Uoti Urpala uoti.urpala at pp1.inet.fi
Sun Mar 22 00:27:46 CET 2009


On Sat, 2009-03-21 at 23:01 +0000, Carl Eugen Hoyos wrote:
> Uoti Urpala <uoti.urpala <at> pp1.inet.fi> writes:
> 
> > > -        && create_vdp_decoder(max_refs) < 0)
> > > +        && !create_vdp_decoder(max_refs))
> > 
> > IMO the previous version was better. I think the most consistent rule is
> > that functions named "do_xyz" (which this is clearly one of) should
> > return a negative error code if they fail to do xyz.
> 
> I don't have any strong opinion on this, but since this clearly simplifies
> calling create_vdp_decoder()

IMO using "!f()" instead of "f() < 0" is not a "clear simplification".

>  and I have been specifically asked to do this
> change

You mean the change of calling it in more places, not the interface
change you did in this commit right? That's no argument for either
interface being better; it only means that the interface can matter
(obviously it wouldn't matter if nobody was calling it).

> , I'll only revert if there is general consensus.

"General consensus" of who? Do you think lots of people should mail you
about something like this? Anyway this one function was not my main
point (there already are other inconsistent interfaces, including more
important ones, in MPlayer that should equally be changed) but the more
general idea of consistent interfaces so you don't add more such cases
in the future.



More information about the MPlayer-cvslog mailing list