[FFmpeg-cvslog] r23056 - trunk/libavfilter/vf_scale.c

stefano subversion
Sat May 8 00:12:14 CEST 2010


Author: stefano
Date: Sat May  8 00:12:13 2010
New Revision: 23056

Log:
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.

Modified:
   trunk/libavfilter/vf_scale.c

Modified: trunk/libavfilter/vf_scale.c
==============================================================================
--- trunk/libavfilter/vf_scale.c	Sat May  8 00:12:10 2010	(r23055)
+++ trunk/libavfilter/vf_scale.c	Sat May  8 00:12:13 2010	(r23056)
@@ -128,10 +128,6 @@ static int config_props(AVFilterLink *ou
     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 *ou
 
     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;
 }
 



More information about the ffmpeg-cvslog mailing list