[FFmpeg-devel] [PATCH] Cosmetics: adopt compact notation in disabled code.

Måns Rullgård mans
Mon Feb 14 11:32:54 CET 2011


Stefano Sabatini <stefano.sabatini-lala at poste.it> writes:

> On date Saturday 2011-02-12 18:58:46 +0000, M?ns Rullg?rd encoded:
>> Stefano Sabatini <stefano.sabatini-lala at poste.it> writes:
>> 
>> > On date Saturday 2011-02-12 17:55:06 +0000, M?ns Rullg?rd encoded:
>> >> Stefano Sabatini <stefano.sabatini-lala at poste.it> writes:
>> >> 
>> >> > Improve readability.
>> >> > ---
>> >> >  ffplay.c |   30 +++++++-----------------------
>> >> >  1 files changed, 7 insertions(+), 23 deletions(-)
>> >> >
>> >> > diff --git a/ffplay.c b/ffplay.c
>> >> > index de2a594..bd0ec73 100644
>> >> > --- a/ffplay.c
>> >> > +++ b/ffplay.c
>> >> > @@ -724,31 +724,15 @@ static void video_image_display(VideoState *is)
>> >> >              is->dtg_active_format = is->video_st->codec->dtg_active_format;
>> >> >              printf("dtg_active_format=%d\n", is->dtg_active_format);
>> >> >          }
>> >> > -#endif
>> >> > -#if 0
>> >> >          switch(is->video_st->codec->dtg_active_format) {
>> >> 
>> >> Why is this #if 0 block there at all?
>> >
>> > Legacy code, I don't have the time to inquire now but with the compact
>> > notation I get less "distracted" by it.
>> 
>> Is there any reason to believe it is useful at all?  Does it even
>> compile if enabled?
>
> Yes it compiles, since I have no idea of what all this DTG_AFD thing
> is I want to keep untouched the logic of the code.
>
> Patch updated with a more verbose commit message.
> -- 
> FFmpeg = Fundamental and Fast Magnificient Perennial Entertaining Gymnast
>
> From 30d8b01ee8048ebdcb38e6bd547909d4cbcd1eea Mon Sep 17 00:00:00 2001
> From: Stefano Sabatini <stefano.sabatini-lala at poste.it>
> Date: Sat, 12 Feb 2011 18:25:53 +0100
> Subject: [PATCH] In ffplay adopt compact notation in code which sets aspect ration from
>  the DTG active format.
>
> This is legacy code, since it's not clear why it was left behind I'm
> leaving the logic untouched. Improve readability.
> ---
>  ffplay.c |   28 +++++++---------------------
>  1 files changed, 7 insertions(+), 21 deletions(-)
>
> diff --git a/ffplay.c b/ffplay.c
> index 170acfd..be26150 100644
> --- a/ffplay.c
> +++ b/ffplay.c
> @@ -723,27 +723,13 @@ static void video_image_display(VideoState *is)
>  #if 0
>          switch(is->video_st->codec->dtg_active_format) {
>          case FF_DTG_AFD_SAME:

That code has _never_ been enabled.  Just delete it.

The DTG thing appears to be some additional aspect ratio signalling used
in DVB, and this is clearly the wrong way to handle it.  It does not
belong in AVCodecContext at all IMHO.  Instead, the decoder should set
sample_aspect_ratio properly.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list