From 01e3340fb6022465ab23cf4a67a89c869b64476e Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 29 Sep 2013 19:52:37 +0200 Subject: [PATCH] swscale: make bilinear scaling the default Before this commit, sws_init_context() failed with an error if no scaler was explicitly set. Defaulting to something reasonable is better behavior. Signed-off-by: Michael Niedermayer --- libswscale/options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libswscale/options.c b/libswscale/options.c index 8985e6b5d6..2b3147bb96 100644 --- a/libswscale/options.c +++ b/libswscale/options.c @@ -34,7 +34,7 @@ static const char *sws_context_to_name(void *ptr) #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM static const AVOption swscale_options[] = { - { "sws_flags", "scaler flags", OFFSET(flags), AV_OPT_TYPE_FLAGS, { .i64 = DEFAULT }, 0, UINT_MAX, VE, "sws_flags" }, + { "sws_flags", "scaler flags", OFFSET(flags), AV_OPT_TYPE_FLAGS, { .i64 = SWS_BILINEAR }, 0, UINT_MAX, VE, "sws_flags" }, { "fast_bilinear", "fast bilinear", 0, AV_OPT_TYPE_CONST, { .i64 = SWS_FAST_BILINEAR }, INT_MIN, INT_MAX, VE, "sws_flags" }, { "bilinear", "bilinear", 0, AV_OPT_TYPE_CONST, { .i64 = SWS_BILINEAR }, INT_MIN, INT_MAX, VE, "sws_flags" }, { "bicubic", "bicubic", 0, AV_OPT_TYPE_CONST, { .i64 = SWS_BICUBIC }, INT_MIN, INT_MAX, VE, "sws_flags" },