summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libswscale/utils.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c
index b496b8f525..82c8e5e532 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -1045,6 +1045,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;