aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2010-05-07 22:12:13 +0000
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2010-05-07 22:12:13 +0000
commitd760a316e9e7060e249fd4cbd4a187c28fa3f86a (patch)
tree2aed9a97f78908156a8c14f7e22df3a8c4c9c5c6
parent38efdb2c6badfbf0d1b415bf9c6a1920c2e446de (diff)
downloadffmpeg-d760a316e9e7060e249fd4cbd4a187c28fa3f86a.tar.gz
Make config_props() show conversion information before to create the
swscale context. This makes eventual warnings issued in case of swscale context creation failure to be shown after the conversion information rather than before, which is slightly less confusing. Originally committed as revision 23056 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavfilter/vf_scale.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c
index 4ba7e9f6b7..ef5c3c35e9 100644
--- a/libavfilter/vf_scale.c
+++ b/libavfilter/vf_scale.c
@@ -128,10 +128,6 @@ static int config_props(AVFilterLink *outlink)
outlink->h = h;
/* TODO: make algorithm configurable */
- scale->sws = sws_getContext(inlink ->w, inlink ->h, inlink ->format,
- outlink->w, outlink->h, outlink->format,
- scale->flags, NULL, NULL, NULL);
-
av_log(ctx, AV_LOG_INFO, "w:%d h:%d fmt:%s -> w:%d h:%d fmt:%s flags:%0x\n",
inlink ->w, inlink ->h, av_pix_fmt_descriptors[ inlink->format].name,
outlink->w, outlink->h, av_pix_fmt_descriptors[outlink->format].name,
@@ -139,6 +135,10 @@ static int config_props(AVFilterLink *outlink)
scale->input_is_pal = av_pix_fmt_descriptors[inlink->format].flags & PIX_FMT_PAL;
+ scale->sws = sws_getContext(inlink ->w, inlink ->h, inlink ->format,
+ outlink->w, outlink->h, outlink->format,
+ scale->flags, NULL, NULL, NULL);
+
return !scale->sws;
}