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

Michael Niedermayer michaelni at gmx.at
Mon Jul 16 20:17:35 CEST 2012


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;
 
         if ((ret = config_props(outlink)) < 0)
             av_assert0(0); //what to do here ?
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list