opt_pix_fmts: try to fix segfault on open solaris
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 26 Nov 2011 12:16:43 +0000 (13:16 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 26 Nov 2011 12:25:29 +0000 (13:25 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
cmdutils.c

index ee7d660..daca802 100644 (file)
@@ -775,6 +775,8 @@ int opt_pix_fmts(const char *opt, const char *arg)
 
     for (pix_fmt = 0; pix_fmt < PIX_FMT_NB; pix_fmt++) {
         const AVPixFmtDescriptor *pix_desc = &av_pix_fmt_descriptors[pix_fmt];
+        if(!pix_desc->name)
+            continue;
         printf("%c%c%c%c%c %-16s       %d            %2d\n",
                sws_isSupportedInput (pix_fmt)      ? 'I' : '.',
                sws_isSupportedOutput(pix_fmt)      ? 'O' : '.',