From 5f87c277bd5caa09cc4f9061d4ccdd58dc121110 Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Fri, 26 Apr 2013 14:49:43 +0200 Subject: [PATCH] vf_scale: add endianness conversion pixel format in query_formats --- libavfilter/vf_scale.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c index 7e83a3a3ac..53e336af0e 100644 --- a/libavfilter/vf_scale.c +++ b/libavfilter/vf_scale.c @@ -122,7 +122,8 @@ static int query_formats(AVFilterContext *ctx) if (ctx->inputs[0]) { formats = NULL; for (pix_fmt = 0; pix_fmt < AV_PIX_FMT_NB; pix_fmt++) - if ( sws_isSupportedInput(pix_fmt) + if ((sws_isSupportedInput(pix_fmt) || + sws_isSupportedEndiannessConversion(pix_fmt)) && (ret = ff_add_format(&formats, pix_fmt)) < 0) { ff_formats_unref(&formats); return ret; @@ -132,7 +133,8 @@ static int query_formats(AVFilterContext *ctx) if (ctx->outputs[0]) { formats = NULL; for (pix_fmt = 0; pix_fmt < AV_PIX_FMT_NB; pix_fmt++) - if ( sws_isSupportedOutput(pix_fmt) + if ((sws_isSupportedOutput(pix_fmt) || + sws_isSupportedEndiannessConversion(pix_fmt)) && (ret = ff_add_format(&formats, pix_fmt)) < 0) { ff_formats_unref(&formats); return ret;