Commit 7b2b06eb authored by Michael Niedermayer's avatar Michael Niedermayer

swscale/utils: dont print message about filter size when the cause is a malloc failure

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 2daf5802
......@@ -577,8 +577,10 @@ static av_cold int initFilter(int16_t **outFilter, int32_t **filterPos,
filterSize = (minFilterSize + (filterAlign - 1)) & (~(filterAlign - 1));
av_assert0(filterSize > 0);
filter = av_malloc(filterSize * dstW * sizeof(*filter));
if (!filter)
goto fail;
if (filterSize >= MAX_FILTER_SIZE * 16 /
((flags & SWS_ACCURATE_RND) ? APCK_SIZE : 16) || !filter) {
((flags & SWS_ACCURATE_RND) ? APCK_SIZE : 16)) {
av_log(NULL, AV_LOG_ERROR, "sws: filterSize %d is too large, try less extreme scaling or increase MAX_FILTER_SIZE and recompile\n", filterSize);
goto fail;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment