# HG changeset patch # User stefano # Date 1285765348 0 # Node ID b3c1e86a917c2e40029c7ffef7cec4d96c70fa73 # Parent 6f41498718cd4817d5d53cd8f221ea876a673f35 Amend constraints for the src_format and dst_format options in the SWScale context. diff -r 6f41498718cd -r b3c1e86a917c libswscale/options.c --- a/libswscale/options.c Wed Sep 29 08:44:09 2010 +0000 +++ b/libswscale/options.c Wed Sep 29 13:02:28 2010 +0000 @@ -19,6 +19,7 @@ */ #include "libavutil/avutil.h" +#include "libavutil/pixfmt.h" #include "libavcodec/opt.h" #include "swscale.h" #include "swscale_internal.h" @@ -61,8 +62,8 @@ { "srch", "source height" , OFFSET(srcH), FF_OPT_TYPE_INT, DEFAULT, 1, INT_MAX, VE }, { "dstw", "destination width" , OFFSET(dstW), FF_OPT_TYPE_INT, DEFAULT, 1, INT_MAX, VE }, { "dsth", "destination height", OFFSET(dstH), FF_OPT_TYPE_INT, DEFAULT, 1, INT_MAX, VE }, - { "src_format", "source format" , OFFSET(srcFormat), FF_OPT_TYPE_INT, DEFAULT, 1, UINT_MAX, VE }, - { "dst_format", "destination format", OFFSET(dstFormat), FF_OPT_TYPE_INT, DEFAULT, 1, UINT_MAX, VE }, + { "src_format", "source format" , OFFSET(srcFormat), FF_OPT_TYPE_INT, DEFAULT, 0, PIX_FMT_NB-1, VE }, + { "dst_format", "destination format", OFFSET(dstFormat), FF_OPT_TYPE_INT, DEFAULT, 0, PIX_FMT_NB-1, VE }, { "src_range" , "source range" , OFFSET(srcRange) , FF_OPT_TYPE_INT, DEFAULT, 0, 1, VE }, { "dst_range" , "destination range" , OFFSET(dstRange) , FF_OPT_TYPE_INT, DEFAULT, 0, 1, VE }, { "param0" , "scaler param 0" , OFFSET(param[0]) , FF_OPT_TYPE_DOUBLE, DEFAULT, INT_MIN, INT_MAX, VE },