mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
swscale/swscale: Check srcSliceH for bayer
Fixes: Assertion srcSliceH > 1 failed at libswscale/swscale_unscaled.c:1359 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
18f26f8a2f
commit
64098d0cd8
@ -904,7 +904,8 @@ static int scale_internal(SwsContext *c,
|
||||
|
||||
if ((srcSliceY & (macro_height_src - 1)) ||
|
||||
((srcSliceH & (macro_height_src - 1)) && srcSliceY + srcSliceH != c->srcH) ||
|
||||
srcSliceY + srcSliceH > c->srcH) {
|
||||
srcSliceY + srcSliceH > c->srcH ||
|
||||
(isBayer(c->srcFormat) && srcSliceH <= 1)) {
|
||||
av_log(c, AV_LOG_ERROR, "Slice parameters %d, %d are invalid\n", srcSliceY, srcSliceH);
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user