showfiltfmts: use av_get_pix_fmt_name()
authorStefano Sabatini <stefano.sabatini-lala@poste.it>
Tue, 7 Jun 2011 00:18:19 +0000 (02:18 +0200)
committerStefano Sabatini <stefano.sabatini-lala@poste.it>
Tue, 7 Jun 2011 10:44:51 +0000 (12:44 +0200)
Use av_get_pix_fmt_name() rather than access
av_pix_fmt_descriptors. Improve readability.

tools/lavfi-showfiltfmts.c

index 19bb6f6..cc19e00 100644 (file)
@@ -81,7 +81,7 @@ int main(int argc, char **argv)
         for (j = 0; j < fmts->format_count; j++)
             printf("INPUT[%d] %s: %s\n",
                    i, filter_ctx->filter->inputs[i].name,
-                   av_pix_fmt_descriptors[fmts->formats[j]].name);
+                   av_get_pix_fmt_name(fmts->formats[j]));
     }
 
     /* print the supported formats in output */
@@ -90,7 +90,7 @@ int main(int argc, char **argv)
         for (j = 0; j < fmts->format_count; j++)
             printf("OUTPUT[%d] %s: %s\n",
                    i, filter_ctx->filter->outputs[i].name,
-                   av_pix_fmt_descriptors[fmts->formats[j]].name);
+                   av_get_pix_fmt_name(fmts->formats[j]));
     }
 
     avfilter_free(filter_ctx);