[FFmpeg-devel] [PATCH 4/4] vf_scale: reevaluate the expressions on a aspect ratio change.

Stefano Sabatini stefasab at gmail.com
Tue Jul 17 09:26:29 CEST 2012


On date Monday 2012-07-16 20:17:35 +0200, Michael Niedermayer encoded:
> Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> ---
>  libavfilter/vf_scale.c |    5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c
> index 2a36399..789f547 100644
> --- a/libavfilter/vf_scale.c
> +++ b/libavfilter/vf_scale.c
> @@ -280,12 +280,15 @@ static void start_frame(AVFilterLink *link, AVFilterBufferRef *picref)
>  
>      if(   picref->video->w != link->w
>         || picref->video->h != link->h
> -       || picref->format   != link->format) {
> +       || picref->format   != link->format
> +       || av_cmp_q(picref->video->sample_aspect_ratio, link->sample_aspect_ratio)
> +    ) {
>          int ret;
>  
>          link->dst->inputs[0]->format = picref->format;
>          link->dst->inputs[0]->w      = picref->video->w;
>          link->dst->inputs[0]->h      = picref->video->h;
> +        link->dst->inputs[0]->sample_aspect_ratio = picref->video->sample_aspect_ratio;

link->dst->inputs[0] == link?

>  
>          if ((ret = config_props(outlink)) < 0)
>              av_assert0(0); //what to do here ?

Looks good but I'm not sure the current code is correct.
-- 
FFmpeg = Frenzy Fancy Mournful Problematic Enchanting Gorilla


More information about the ffmpeg-devel mailing list