[FFmpeg-soc] [soc]: r2791 - aac/aac.c

Michael Niedermayer michaelni at gmx.at
Tue Jul 15 17:44:57 CEST 2008


On Tue, Jul 15, 2008 at 04:29:52PM +0100, Robert Swain wrote:
> 2008/7/15 Michael Niedermayer <michaelni at gmx.at>:
> > On Tue, Jul 15, 2008 at 04:03:03PM +0100, Robert Swain wrote:
> >> 2008/7/15 Benjamin Larsson <banan at ludd.ltu.se>:
> >> > superdump wrote:
> >> >> Author: superdump
> >> >> Date: Tue Jul 15 15:47:11 2008
> >> >> New Revision: 2791
> >> >>
> >> >> Log:
> >> >> Add some allocation checks
> >> >>
> >> >
> >> > There should be a NOMEM error. Look in cook.c for reference.
> >>
> >> Or rather atrac3.c or so. How about the attached? I had to add code to
> >> propagate the error values through to the main functions as I assume
> >> only the return values of the init, decode, encode and close functions
> >> really matter.
> > [...]
> >
> >> -        if(program_config_element_default(ac, channels) < 0)
> >> +        if((ret = program_config_element_default(ac, channels)))
> >>              return -1;
> >
> > shouldnt that be return ret?
> 
> It should be ret, yes. Fixed.
> 
> > Also the <0 disappeared, was that intended?
> 
> It was intended, yes. All other values returned were either 0 or -1
> and I didn't know what the value of AVERROR(ENOMEM) was so I removed
> the < 0.

AVERROR() is <0

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Old school: Use the lowest level language in which you can solve the problem
            conveniently.
New school: Use the highest level language in which the latest supercomputer
            can solve the problem without the user falling asleep waiting.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-soc/attachments/20080715/64472408/attachment.pgp>


More information about the FFmpeg-soc mailing list