changeset 30337:98086c4f3cb4

Avoid more pointless tests, the input and output formats need to be supported both as input and as output, as the conversion performed is: yuva420p -> src -> dst -> yuva420p.
author stefano
date Wed, 20 Jan 2010 00:22:31 +0000
parents 33e5899ad14d
children 4f25e4d519f4
files libswscale/swscale-example.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libswscale/swscale-example.c	Tue Jan 19 22:36:46 2010 +0000
+++ b/libswscale/swscale-example.c	Wed Jan 20 00:22:31 2010 +0000
@@ -198,14 +198,14 @@
     enum PixelFormat srcFormat, dstFormat;
 
     for (srcFormat = 0; srcFormat < PIX_FMT_NB; srcFormat++) {
-        if (!sws_isSupportedInput(srcFormat))
+        if (!sws_isSupportedInput(srcFormat) || !sws_isSupportedOutput(srcFormat))
             continue;
 
         for (dstFormat = 0; dstFormat < PIX_FMT_NB; dstFormat++) {
             int i, j, k;
             int res = 0;
 
-            if (!sws_isSupportedOutput(dstFormat))
+            if (!sws_isSupportedInput(dstFormat) || !sws_isSupportedOutput(dstFormat))
                 continue;
 
             printf("%s -> %s\n",