diff --git a/libswscale/utils.c b/libswscale/utils.c index e5593af4dd..1875a54772 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -1202,6 +1202,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;