[Ffmpeg-devel] Changing "-vstats" option behaviour

Stefano Sabatini stefano.sabatini-lala
Fri Apr 20 14:30:49 CEST 2007


On date Friday 2007-04-20 13:58:24 +0200, Benoit Fouet encoded:
> Stefano Sabatini wrote:
> > On date Friday 2007-04-20 12:36:34 +0200, Benoit Fouet encoded:
> >   
> >> Hi,
> >>
> >> Stefano Sabatini wrote:
> >>     
> >>> Index: ffmpeg.c
> >>> ===================================================================
> >>> --- ffmpeg.c	(revision 8759)
> >>> +++ ffmpeg.c	(working copy)
> >>> @@ -3806,6 +3817,11 @@
> >>>  
> >>>      av_free(intra_matrix);
> >>>      av_free(inter_matrix);
> >>> +
> >>> +    if (vstats_filename) {
> >>> +        fclose(fvstats);
> >>> +        av_free(vstats_filename);
> >>> +    }
> >>>   
> >>>       
> >> how about:
> >> if (fvstats)
> >>     fclose(fvstats);
> >> av_free(vstats_filename);
> >>     
> >
> > I prefer the former for a... psychology reason, enclosing it in a
> > block make more apparent the correlation between the fvstats and
> > vstats_filename object...
> but you can also have vstats_filename set without fvstats being opened.
> if do_video_stats function is not called (for a reason i don't (want to)
> know), the filename exists even though the file is not opened, no ?

Goes for the second, which is safer.

Cheers
-- 
Stefano Sabatini
Linux user number 337176 (see http://counter.li.org)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vstats_file-4.patch
Type: text/x-diff
Size: 4271 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070420/ecfb451e/attachment.patch>



More information about the ffmpeg-devel mailing list