[FFmpeg-devel] [PATCH] qt-faststart: Clean up properly at all exit points

Martin Storsjö martin
Sun May 9 19:42:29 CEST 2010


On Sun, 2 May 2010, Martin Storsj? wrote:

> On Sun, 2 May 2010, Reimar D?ffinger wrote:
> 
> > > -    FILE *infile;
> > > -    FILE *outfile;
> > > +    FILE *infile = 0;
> > > +    FILE *outfile = 0;
> > > -    unsigned char *moov_atom;
> > > +    unsigned char *moov_atom = 0;
> > 
> > Please use NULL for pointers.
> 
> Fixed, but kept the = 0 for the already existing initialization of 
> ftyp_atom. I can change that one later, for consistency.
> 
> > > @@ -100,8 +100,7 @@ int main(int argc, char *argv[])
> > >  
> > >      infile = fopen(argv[1], "rb");
> > >      if (!infile) {
> > > -        perror(argv[1]);
> > > -        return 1;
> > > +        goto error_out;
> > 
> > You removed the perror...
> 
> Oops, fixed.

Ping

// Martin



More information about the ffmpeg-devel mailing list