[FFmpeg-cvslog] r25471 - trunk/libavfilter/vf_unsharp.c
stefano
subversion
Wed Oct 13 15:14:52 CEST 2010
Author: stefano
Date: Wed Oct 13 15:14:52 2010
New Revision: 25471
Log:
Make the validity checks fail only if the corresponding luma or chroma
values are not zero.
Prevent aborting with the default values.
Modified:
trunk/libavfilter/vf_unsharp.c
Modified: trunk/libavfilter/vf_unsharp.c
==============================================================================
--- trunk/libavfilter/vf_unsharp.c Wed Oct 13 15:11:45 2010 (r25470)
+++ trunk/libavfilter/vf_unsharp.c Wed Oct 13 15:14:52 2010 (r25471)
@@ -133,7 +133,8 @@ static av_cold int init(AVFilterContext
sscanf(args, "%d:%d:%lf:%d:%d:%lf", &lmsize_x, &lmsize_y, &lamount,
&cmsize_x, &cmsize_y, &camount);
- if (lmsize_x < 2 || lmsize_y < 2 || cmsize_x < 2 || cmsize_y < 2) {
+ if ((lamount && (lmsize_x < 2 || lmsize_y < 2)) ||
+ (camount && (cmsize_x < 2 || cmsize_y < 2))) {
av_log(ctx, AV_LOG_ERROR,
"Invalid value <2 for lmsize_x:%d or lmsize_y:%d or cmsize_x:%d or cmsize_y:%d\n",
lmsize_x, lmsize_y, cmsize_x, cmsize_y);
More information about the ffmpeg-cvslog
mailing list