# HG changeset patch # User michael # Date 1216332078 0 # Node ID 99a48982884043d40a39be4302e122af4ec1c7a8 # Parent 3a1a148a9633d88aabbadba5d5d69d9b7593c8bc Ensure that exactly one scaler algo is used. diff -r 3a1a148a9633 -r 99a489828840 libswscale/swscale.c --- a/libswscale/swscale.c Thu Jul 17 19:37:19 2008 +0000 +++ b/libswscale/swscale.c Thu Jul 17 22:01:18 2008 +0000 @@ -2014,6 +2014,23 @@ return NULL; } + i= flags & ( SWS_POINT + |SWS_AREA + |SWS_FAST_BILINEAR + |SWS_BICUBIC + |SWS_X + |SWS_GAUSS + |SWS_LANCZOS + |SWS_SINC + |SWS_SPLINE + |SWS_BICUBLIN); + if(!i || (i & (i-1))) + { + av_log(NULL, AV_LOG_ERROR, "swScaler: Exactly one scaler algorithm must be choosen\n"); + return NULL; + } + + /* sanity check */ if (srcW<4 || srcH<1 || dstW<8 || dstH<1) //FIXME check if these are enough and try to lowwer them after fixing the relevant parts of the code {