1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

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>
This commit is contained in:
Michael Niedermayer 2016-01-04 23:22:25 +01:00
parent 9434ec5f76
commit 1edf129cbc

View File

@ -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;