# HG changeset patch # User stefano # Date 1263937920 0 # Node ID a31ec2f03d5410b722dd9da0fdd6840d0e0dda71 # Parent f117b72cc42b6e68a1cc6e5dc4af8d86116169f8 Make selfTest() perform tests where both the input and output formats are supported, avoid pointless loops. diff -r f117b72cc42b -r a31ec2f03d54 libswscale/swscale-example.c --- 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));