Skip to content
Snippets Groups Projects
Commit 6fae8c54 authored by Stefano Sabatini's avatar Stefano Sabatini
Browse files

Make the validity checks fail only if the corresponding luma or chroma

values are not zero.
Prevent aborting with the default values.

Originally committed as revision 25471 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent aec96695
No related branches found
No related tags found
No related merge requests found
...@@ -133,7 +133,8 @@ static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque) ...@@ -133,7 +133,8 @@ static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)
sscanf(args, "%d:%d:%lf:%d:%d:%lf", &lmsize_x, &lmsize_y, &lamount, sscanf(args, "%d:%d:%lf:%d:%d:%lf", &lmsize_x, &lmsize_y, &lamount,
&cmsize_x, &cmsize_y, &camount); &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, 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", "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); lmsize_x, lmsize_y, cmsize_x, cmsize_y);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment