[FFmpeg-soc] [soc]: r2918 - aac/aac.c
Aurelien Jacobs
aurel at gnuage.org
Thu Jul 31 00:12:33 CEST 2008
Robert Swain wrote:
> 2008/7/30 superdump <subversion at mplayerhq.hu>:
> > Author: superdump
> > Date: Wed Jul 30 14:29:52 2008
> > New Revision: 2918
> >
> > Log:
> > Refactor program_config_element*() to remove memset(pcs, 0, ...) and
> > output_configure()
> >
> >
> > Modified:
> > aac/aac.c
> >
> > Modified: aac/aac.c
> > ==============================================================================
> > --- aac/aac.c (original)
> > +++ aac/aac.c Wed Jul 30 14:29:52 2008
>
> [...]
>
> > @@ -2281,8 +2278,14 @@ static int aac_decode_frame(AVCodecConte
> > break;
> >
> > case ID_PCE:
> > - err = program_config_element(ac, &gb);
> > + {
> > + ProgramConfig newpcs;
> > + memset(&newpcs, 0, sizeof(ProgramConfig));
> > + if((err = program_config_element(ac, &gb, &newpcs)))
> > + break;
> > + err = output_configure(ac, &newpcs);
> > break;
> > + }
>
> I'm not sure what level of indentation to use for the {}. If any of
> this is disagreeable, complain at me and I'll change it. It seemed the
> best solution to me.
Just an idea (which seems commonly used in ffmpeg):
case ID_PCE: {
ProgramConfig newpcs;
memset(&newpcs, 0, sizeof(ProgramConfig));
if((err = program_config_element(ac, &gb, &newpcs)))
break;
err = output_configure(ac, &newpcs);
break;
}
Well, it saves one line.
But note that I have no strong opinion about this. Do it as you want.
Aurel
More information about the FFmpeg-soc
mailing list