[FFmpeg-devel] [PATCH] Use symbolic names for PAL/NTSC rather than numeric constants in ffmpeg.c:opt_target

Michael Niedermayer michaelni
Mon Dec 14 01:21:29 CET 2009


On Sun, Dec 13, 2009 at 06:05:29PM +0100, Stefano Sabatini wrote:
> On date Sunday 2009-12-13 16:40:39 +0100, Michael Niedermayer encoded:
> > On Sun, Dec 13, 2009 at 04:31:51PM +0100, Stefano Sabatini wrote:
> > > Hi, as in subject, improve readability.
> > > -- 
> > > FFmpeg = Fierce & Friendly Mastodontic Programmable Epic Generator
> > 
> > >  ffmpeg.c |   33 +++++++++++++++++----------------
> > >  1 file changed, 17 insertions(+), 16 deletions(-)
> > > 65a70f82a8b3a2dc7cfb61d2e7f1d387f93da6ce  ffmpeg-use-symbol-for-pal-ntsc.patch
> > > Index: ffmpeg.c
> > > ===================================================================
> > > --- ffmpeg.c	(revision 20821)
> > > +++ ffmpeg.c	(working copy)
> > > @@ -3598,26 +3598,27 @@
> > >  
> > >  static void opt_target(const char *arg)
> > >  {
> > > +    enum { PAL, NTSC, FILM };
> > 
> > >      int norm = -1;
> > 
> > should be enum not int except that this is a nice improvment and ok
> 
> Right, so UNKNOWN defined explicitely as well.
> -- 
> FFmpeg = Faboulous and Fantastic Merciful Programmable Extended Gorilla

>  ffmpeg.c |   40 ++++++++++++++++++++--------------------
>  1 file changed, 20 insertions(+), 20 deletions(-)
> fca2b09900061e750417eb161147f168ef82b3f3  ffmpeg-use-symbol-for-pal-ntsc.patch

ok

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Rewriting code that is poorly written but fully understood is good.
Rewriting code that one doesnt understand is a sign that one is less smart
then the original author, trying to rewrite it will not make it better.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20091214/4b7a9664/attachment.pgp>



More information about the ffmpeg-devel mailing list