]> git.sesse.net Git - vlc/commitdiff
Use vlc_fourcc_GetDescription for item infos.
authorLaurent Aimar <fenrir@videolan.org>
Wed, 18 Mar 2009 20:39:32 +0000 (21:39 +0100)
committerLaurent Aimar <fenrir@videolan.org>
Wed, 13 May 2009 19:18:18 +0000 (21:18 +0200)
src/input/es_out.c

index 86cf9e4c6d52d7305db5f46258a639b277a48f7c..7f8b108cec87075155e3df3170327a223da609c3 100644 (file)
@@ -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"),