[FFmpeg-cvslog] r25765 - trunk/libavfilter/vf_aspect.c

stefano subversion
Thu Nov 18 21:37:23 CET 2010


Author: stefano
Date: Thu Nov 18 21:37:22 2010
New Revision: 25765

Log:
Log error message in case of invalid parsing.

Modified:
   trunk/libavfilter/vf_aspect.c

Modified: trunk/libavfilter/vf_aspect.c
==============================================================================
--- trunk/libavfilter/vf_aspect.c	Thu Nov 18 21:37:20 2010	(r25764)
+++ trunk/libavfilter/vf_aspect.c	Thu Nov 18 21:37:22 2010	(r25765)
@@ -37,8 +37,11 @@ static av_cold int init(AVFilterContext 
 
     if (args) {
         if (sscanf(args, "%d:%d", &aspect->aspect.num, &aspect->aspect.den) < 2) {
-            if (sscanf(args, "%lf", &ratio) < 1)
-                return -1;
+            if (sscanf(args, "%lf", &ratio) < 1) {
+                av_log(ctx, AV_LOG_ERROR,
+                       "Invalid string '%s' for aspect ratio.\n", args);
+                return AVERROR(EINVAL);
+            }
             aspect->aspect = av_d2q(ratio, 100);
         } else {
             gcd = av_gcd(FFABS(aspect->aspect.num), FFABS(aspect->aspect.den));



More information about the ffmpeg-cvslog mailing list