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

Martin Storsjö martin
Sun May 2 11:04:34 CEST 2010


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.

// Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-qt-faststart-Use-the-error_out-cleanup-code-path-for.patch
Type: text/x-diff
Size: 4876 bytes
Desc: 
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100502/cc11fea2/attachment.patch>



More information about the ffmpeg-devel mailing list