mirror of
https://git.videolan.org/git/ffmpeg.git
synced 2024-08-25 19:01:51 +02:00
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>
This commit is contained in:
parent
1431b4cf77
commit
0d05406482
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user