aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-05-12 20:19:47 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-05-12 20:19:47 +0200
commit0d05406482950b7c129eccfefe0daa3d6d47e292 (patch)
tree9c9a8d5e8ed4cefd566f188268629c8d6b18bbff /libavfilter
parent1431b4cf77d62596e9fa0b8224e7f38e20b55f24 (diff)
downloadffmpeg-0d05406482950b7c129eccfefe0daa3d6d47e292.tar.gz
avfilter/vf_cover_rect: Handle the case where the cover rectangle is as large as the input
Fixes division by 0 Fixes CID1297575 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/vf_cover_rect.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/vf_cover_rect.c b/libavfilter/vf_cover_rect.c
index d12807ad53..c2020bb392 100644
--- a/libavfilter/vf_cover_rect.c
+++ b/libavfilter/vf_cover_rect.c
@@ -132,7 +132,7 @@ static void blur(CoverContext *cover, AVFrame *in, int offx, int offy)
s += data[x + h*stride] * scale;
c += scale;
}
- data[x + y*stride] = (s + (c>>1)) / c;
+ data[x + y*stride] = c ? (s + (c>>1)) / c : 0;
}
}
}