changeset 30335:a31ec2f03d54

Make selfTest() perform tests where both the input and output formats are supported, avoid pointless loops.
author stefano
date Tue, 19 Jan 2010 21:52:00 +0000
parents f117b72cc42b
children 33e5899ad14d
files libswscale/swscale-example.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libswscale/swscale-example.c	Tue Jan 19 18:53:16 2010 +0000
+++ b/libswscale/swscale-example.c	Tue Jan 19 21:52:00 2010 +0000
@@ -198,10 +198,16 @@
     enum PixelFormat srcFormat, dstFormat;
 
     for (srcFormat = 0; srcFormat < PIX_FMT_NB; srcFormat++) {
+        if (!sws_isSupportedInput(srcFormat))
+            continue;
+
         for (dstFormat = 0; dstFormat < PIX_FMT_NB; dstFormat++) {
             int i, j, k;
             int res = 0;
 
+            if (!sws_isSupportedOutput(dstFormat))
+                continue;
+
             printf("%s -> %s\n",
                    sws_format_name(srcFormat),
                    sws_format_name(dstFormat));