Browse Source

Log error message in case of invalid parsing.

Originally committed as revision 25765 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/n0.8
Stefano Sabatini 14 years ago
parent
commit
9abf34411a
1 changed files with 5 additions and 2 deletions
  1. +5
    -2
      libavfilter/vf_aspect.c

+ 5
- 2
libavfilter/vf_aspect.c View File

@@ -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));


Loading…
Cancel
Save