summaryrefslogtreecommitdiff
path: root/libswscale
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-04-09 00:23:56 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-04-09 00:57:12 +0200
commit7b2b06eb43d2053a2f6f4a12f2e438285b15576f (patch)
tree475bff7c22a46a677ef67d494071f74bce2585de /libswscale
parent2daf580284d0ca4e43030c0cf3f6e5a604233f7d (diff)
swscale/utils: dont print message about filter size when the cause is a malloc failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswscale')
-rw-r--r--libswscale/utils.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c
index 983824b222..20c2d4e972 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -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;
}