ffmpeg | branch: master | Michael Niedermayer <michae...@gmx.at> | Tue May 12 20:19:47 2015 +0200| [0d05406482950b7c129eccfefe0daa3d6d47e292] | committer: Michael Niedermayer
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 <michae...@gmx.at> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0d05406482950b7c129eccfefe0daa3d6d47e292 --- libavfilter/vf_cover_rect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/vf_cover_rect.c b/libavfilter/vf_cover_rect.c index d12807a..c2020bb 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; } } } _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog