Browse code

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

Stefano Sabatini authored on 2010/05/08 07:12:13
Showing 1 changed files
... ...
@@ -128,10 +128,6 @@ static int config_props(AVFilterLink *outlink)
128 128
     outlink->h = h;
129 129
 
130 130
     /* TODO: make algorithm configurable */
131
-    scale->sws = sws_getContext(inlink ->w, inlink ->h, inlink ->format,
132
-                                outlink->w, outlink->h, outlink->format,
133
-                                scale->flags, NULL, NULL, NULL);
134
-
135 131
     av_log(ctx, AV_LOG_INFO, "w:%d h:%d fmt:%s -> w:%d h:%d fmt:%s flags:%0x\n",
136 132
            inlink ->w, inlink ->h, av_pix_fmt_descriptors[ inlink->format].name,
137 133
            outlink->w, outlink->h, av_pix_fmt_descriptors[outlink->format].name,
... ...
@@ -139,6 +135,10 @@ static int config_props(AVFilterLink *outlink)
139 139
 
140 140
     scale->input_is_pal = av_pix_fmt_descriptors[inlink->format].flags & PIX_FMT_PAL;
141 141
 
142
+    scale->sws = sws_getContext(inlink ->w, inlink ->h, inlink ->format,
143
+                                outlink->w, outlink->h, outlink->format,
144
+                                scale->flags, NULL, NULL, NULL);
145
+
142 146
     return !scale->sws;
143 147
 }
144 148