[FFmpeg-devel] [PATCH] Use the same input value for the frame pixel aspect if the parameter is not set (rather than set the undefined value 0/1).

Stefano Sabatini stefano.sabatini-lala
Thu Nov 18 22:43:26 CET 2010


---
 libavfilter/vf_aspect.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/libavfilter/vf_aspect.c b/libavfilter/vf_aspect.c
index 27f02fb..58c7d23 100644
--- a/libavfilter/vf_aspect.c
+++ b/libavfilter/vf_aspect.c
@@ -59,9 +59,6 @@ static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)
         }
     }
 
-    if (aspect->aspect.den == 0)
-        aspect->aspect = (AVRational) {0, 1};
-
     av_log(ctx, AV_LOG_INFO, "a:%d/%d\n", aspect->aspect.num, aspect->aspect.den);
     return 0;
 }
@@ -70,7 +67,8 @@ static void start_frame(AVFilterLink *link, AVFilterBufferRef *picref)
 {
     AspectContext *aspect = link->dst->priv;
 
-    picref->video->pixel_aspect = aspect->aspect;
+    if (aspect->aspect.num)
+        picref->video->pixel_aspect = aspect->aspect;
     avfilter_start_frame(link->dst->outputs[0], picref);
 }
 
-- 
1.7.1




More information about the ffmpeg-devel mailing list