[MPlayer-dev-eng] [PATCH] Fix return types of libvo API

Rich Felker dalias at aerifal.cx
Mon Aug 1 05:13:17 CEST 2005


On Mon, Aug 01, 2005 at 12:21:04AM +0200, Reimar Döffinger wrote:
> Hi,
> On Fri, Jul 29, 2005 at 03:36:48AM +0200, Ivo wrote:
> > As stated in an earlier post, the libvo functions that return a value are 
> > declared wrongly. They return uint32_t, but lots of vo's return -1 in 
> > certain functions, or  <= VO_ERROR (<= -1). This patch changes all 
> > declarations and definitions to static int instead of static uint32_t.
> 
> Whether this really is "wrong" or not might be disputable, but it
> certainly is a completely unnecesary use of *int*_t types...

It's wrong because of the signed/unsigned mismatch. Returning -1 from
a function with unsigned return type is broken.

> > I have not seen any ill effects yet, now that the calling code actually gets 
> > negative values for VO_ERROR/NOTIMPL/etc., but there might be. Look out for 
> > them and report back please :)
> 
> I'd actually say wait another day an the commit. You can then join the
> cola-party cause by my filter commits, Alexanders libavutil commit and
> Robertos demuxer commit (or in other words: let's do our worst, so we
> can release pre8 and say we did everything to give our users
> something to test *g*).

:)

Rich




More information about the MPlayer-dev-eng mailing list