[vlc-devel] commit: Use vlc_fourcc_GetDescription for item infos. (Laurent Aimar )

git version control git at videolan.org
Wed May 13 21:20:17 CEST 2009


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Wed Mar 18 21:39:32 2009 +0100| [31a92955712f448c2fc50bc45e663d11768de602] | committer: Laurent Aimar 

Use vlc_fourcc_GetDescription for item infos.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=31a92955712f448c2fc50bc45e663d11768de602
---

 src/input/es_out.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/input/es_out.c b/src/input/es_out.c
index 86cf9e4..7f8b108 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -37,6 +37,7 @@
 #include <vlc_es_out.h>
 #include <vlc_block.h>
 #include <vlc_aout.h>
+#include <vlc_fourcc.h>
 
 #include "input_internal.h"
 #include "clock.h"
@@ -2677,8 +2678,15 @@ static void EsOutUpdateInfo( es_out_t *out, es_out_id_t *es, const es_format_t *
         input_Control( p_input, INPUT_ADD_INFO, psz_cat, _("Original ID"),
                        "%d", es->i_id );
 
-    input_Control( p_input, INPUT_ADD_INFO, psz_cat, _("Codec"),
-                   "%.4s", (char*)&p_fmt_es->i_codec );
+    const char *psz_codec_description =
+        vlc_fourcc_GetDescription( p_fmt_es->i_cat, p_fmt_es->i_codec );
+    const vlc_fourcc_t i_codec_fourcc = p_fmt_es->i_original_fourcc ?: p_fmt_es->i_codec;
+    if( psz_codec_description )
+        input_Control( p_input, INPUT_ADD_INFO, psz_cat, _("Codec"),
+                       "%s (%.4s)", psz_codec_description, (char*)&i_codec_fourcc );
+    else
+        input_Control( p_input, INPUT_ADD_INFO, psz_cat, _("Codec"),
+                       "%.4s", (char*)&i_codec_fourcc );
 
     if( es->psz_language && *es->psz_language )
         input_Control( p_input, INPUT_ADD_INFO, psz_cat, _("Language"),




More information about the vlc-devel mailing list