mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +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> (cherry picked from commit 64098d0cd8ab1d27f78a335ca684f00a419b2160) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
dad88178f3
commit
67aa4987e7
@ -770,7 +770,8 @@ int attribute_align_arg sws_scale(struct SwsContext *c,
|
||||
|
||||
if ((srcSliceY & (macro_height-1)) ||
|
||||
((srcSliceH& (macro_height-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…
x
Reference in New Issue
Block a user