summaryrefslogtreecommitdiffstats
path: root/libavfilter
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2012-03-21 14:39:24 +0100
committerStefano Sabatini <stefasab@gmail.com>2012-03-21 15:14:28 +0100
commite71e65ff1d7e4b70db34aa169556cf77ae25608a (patch)
treec68035c43937dd28c7f7eb82ec5974b848486e0e /libavfilter
parent6cf53927c4808216c621f21895ad759979d778d1 (diff)
downloadffmpeg-streaming-e71e65ff1d7e4b70db34aa169556cf77ae25608a.zip
ffmpeg-streaming-e71e65ff1d7e4b70db34aa169556cf77ae25608a.tar.gz
lavfi/aspect: check for a negative code from av_parse_ratio()
Check on < 0 rather than on != 0, this is more correct as a positive error code from av_parse_ratio() value doesn't mean an error.
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/vf_aspect.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/vf_aspect.c b/libavfilter/vf_aspect.c
index 9e3b93b..8a56116 100644
--- a/libavfilter/vf_aspect.c
+++ b/libavfilter/vf_aspect.c
@@ -37,7 +37,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)
aspect->ratio = (AVRational) {0, 1};
if (args) {
- if (av_parse_ratio(&aspect->ratio, args, 100, 0, ctx) ||
+ if (av_parse_ratio(&aspect->ratio, args, 100, 0, ctx) < 0 ||
aspect->ratio.num < 0 || aspect->ratio.den <= 0) {
av_log(ctx, AV_LOG_ERROR,
"Invalid string '%s' for aspect ratio.\n", args);
OpenPOWER on IntegriCloud