swscale/utils: Use normal bilinear scaler if fast cannot be used due to tiny dimensions
Fixes Ticket4960 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 1edf129cbc897447a289ca8b045853df5df1bab3) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
9c4d8343bb
commit
dbe194002a
@ -1052,6 +1052,12 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter,
|
||||
srcW, srcH, dstW, dstH);
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
if (flags & SWS_FAST_BILINEAR) {
|
||||
if (srcW < 8 || dstW < 8) {
|
||||
flags ^= SWS_FAST_BILINEAR | SWS_BILINEAR;
|
||||
c->flags = flags;
|
||||
}
|
||||
}
|
||||
|
||||
if (!dstFilter)
|
||||
dstFilter = &dummyFilter;
|
||||
|
Loading…
x
Reference in New Issue
Block a user