aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2010-01-20 00:22:31 +0000
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2010-01-20 00:22:31 +0000
commit613f2dc4ae7970772040abd69ae30b4d0dab9da9 (patch)
tree1da74dbc8c75f7a8e8b7f1ffdd5bc558ac587ef9
parent9528ce7b996a0d31133b3df5e312760f4d4b825b (diff)
downloadffmpeg-613f2dc4ae7970772040abd69ae30b4d0dab9da9.tar.gz
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. Originally committed as revision 30379 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
-rw-r--r--libswscale/swscale-example.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libswscale/swscale-example.c b/libswscale/swscale-example.c
index c8faf80f55..a812ee5963 100644
--- a/libswscale/swscale-example.c
+++ b/libswscale/swscale-example.c
@@ -198,14 +198,14 @@ static void selfTest(uint8_t *ref[4], int refStride[4], int w, int h)
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",