From 92a80570aaf413dccbed1943e703b88d752fb8ec Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <michaelni@gmx.at>
Date: Tue, 19 Oct 2004 10:52:59 +0000
Subject: [PATCH] =?UTF-8?q?add=20the=20long=5Fname=20to=20the=20-formats?=
 =?UTF-8?q?=20output=20patch=20by=20(john=20Galloway=20<jrg=20at=20monster?=
 =?UTF-8?q?bot=20dot=20com>)=20and=20(M=C3=A5ns=20Rullg=C3=A5rd=20<mru=20a?=
 =?UTF-8?q?t=20mru=20dot=20ath=20dot=20cx>)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Originally committed as revision 3611 to svn://svn.ffmpeg.org/ffmpeg/trunk
---
 ffmpeg.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index d221f1213cf..2a7959d4544 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -3491,11 +3491,13 @@ static void show_formats(void)
         int decode=0;
         int encode=0;
         const char *name=NULL;
+        const char *long_name=NULL;
 
         for(ofmt = first_oformat; ofmt != NULL; ofmt = ofmt->next) {
             if((name == NULL || strcmp(ofmt->name, name)<0) &&
                 strcmp(ofmt->name, last_name)>0){
                 name= ofmt->name;
+                long_name= ofmt->long_name;
                 encode=1;
             }
         }
@@ -3503,6 +3505,7 @@ static void show_formats(void)
             if((name == NULL || strcmp(ifmt->name, name)<0) &&
                 strcmp(ifmt->name, last_name)>0){
                 name= ifmt->name;
+                long_name= ifmt->long_name;
                 encode=0;
             }
             if(name && strcmp(ifmt->name, name)==0)
@@ -3513,21 +3516,23 @@ static void show_formats(void)
         last_name= name;
         
         printf(
-            " %s%s %s\n", 
+            " %s%s %-15s %s\n", 
             decode ? "D":" ", 
             encode ? "E":" ", 
-            name);
+            name,
+            long_name ? long_name:" ");
     }
     printf("\n");
 
-    printf("Image formats:\n");
+    printf("Image formats (filename extensions, if any, follow):\n");
     for(image_fmt = first_image_format; image_fmt != NULL; 
         image_fmt = image_fmt->next) {
         printf(
-            " %s%s %s\n",
+            " %s%s %-6s %s\n",
             image_fmt->img_read  ? "D":" ",
             image_fmt->img_write ? "E":" ",
-            image_fmt->name);
+            image_fmt->name,
+            image_fmt->extensions ? image_fmt->extensions:" ");
     }
     printf("\n");
 
-- 
GitLab