aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/vf_aspect.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2010-11-18 20:37:22 +0000
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2010-11-18 20:37:22 +0000
commit9abf34411a37e6628b529da5686708b3f90a87db (patch)
treee5e050dba30d47fda0789e239d988444728fe3e5 /libavfilter/vf_aspect.c
parentbdb47f3a2c64bf296c6769f32b6ec9bc19269926 (diff)
downloadffmpeg-9abf34411a37e6628b529da5686708b3f90a87db.tar.gz
Log error message in case of invalid parsing.
Originally committed as revision 25765 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavfilter/vf_aspect.c')
-rw-r--r--libavfilter/vf_aspect.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libavfilter/vf_aspect.c b/libavfilter/vf_aspect.c
index cdb5390230..cccb117efa 100644
--- a/libavfilter/vf_aspect.c
+++ b/libavfilter/vf_aspect.c
@@ -37,8 +37,11 @@ static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)
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));