[FFmpeg-devel] [PATCH] Implement a cmdutils functions for listing available elements
Sat Nov 14 11:53:30 CET 2009
On Sat, Nov 14, 2009 at 12:55:09AM +0100, Stefano Sabatini wrote:
> On date Sunday 2009-10-25 22:33:14 +0100, Stefano Sabatini encoded:
> > On date Sunday 2009-10-25 20:35:24 +0100, Michael Niedermayer encoded:
> > > i wonder if av_log() would be better, i cant think of any real advantage
> > > for ff* but maybe one day this function could be used by an application
> > > for which fprintf(stderr) is inconvenient
> > Yes using av_log() is a fine idea.
> > > [...]
> > >
> > > > + printf(
> > >
> > > iam sure mixing stderr & stdout like that is not a good idea
> > Please check again, I'm using now av_log(NULL, AV_LOG_INFO, ...) for
> > the headers / explanations, and printf() for the actual listing,
> > I believe that's the expected behavior, as the user wants to
> > read/grep/filter from stdout.
> After more thought, well I don't believe anymore this is a good idea,
> after all this is still an application function and following that
> logic we should then always use av_log rather than fprintf.
> New patch attached, with some minor cosmetics fixes, and with the
> elements sorting.
patch rejected due to 100% code duplication, we have exitsing code in
ffmpeg.c that does that, improve it and or move it around in seperate
patches if you like but this is far too much work to verify to be not
fully broken. Just your obvious messup of mixing printf with av_log
shows how broken the code was. I spotted that one but how many did
Also, just to make it clear, as maybe theres a misunderstanding between
us, i reject ALL unjustfied rewrites. Thats not limited to AVOptions and
this patch, i will reject every future one as well.
Iam sure we do have code that is crap enough to justify a full rewrite
but neiter AVOptions nor show_formats() in ffmpeg.c are ugly written.
The way you make changes even breaks binary search of svn, if your code
is buggy such search would point to the removial of the old code not
the addition of the (in that case) broken code.
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The real ebay dictionary, page 3
"Rare item" - "Common item with rare defect or maybe just a lie"
"Professional" - "'Toy' made in china, not functional except as doorstop"
"Experts will know" - "The seller hopes you are not an expert"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel