[vlc-commits] es_out: only set location chroma info if not defined

Jean-Baptiste Kempf git at videolan.org
Sun Apr 17 11:24:59 CEST 2016


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Apr 17 11:23:38 2016 +0200| [f311f60b25b535f887a5b84798ed13820fbf79ec] | committer: Jean-Baptiste Kempf

es_out: only set location chroma info if not defined

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

 src/input/es_out.c |   23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/src/input/es_out.c b/src/input/es_out.c
index 330b290..bd01c3e 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -3057,16 +3057,19 @@ static void EsOutUpdateInfo( es_out_t *out, es_out_id_t *es, const es_format_t *
                                   _(space_names[fmt->video.space]),
                                   _(range_names[fmt->video.b_color_range_full]) );
        }
-       static const char *c_loc_names[] = { N_("Undefined"),
-           N_("Left"),
-           N_("Center"),
-           N_("Top Left"),
-           N_("Top Center"),
-           N_("Bottom Left"),
-           N_("Bottom Center"),
-       };
-       info_category_AddInfo( p_cat, _("Chroma location"), "%s",
-                              _(c_loc_names[fmt->video.chroma_location]) );
+       if( fmt->video.chroma_location != CHROMA_LOCATION_UNDEF )
+       {
+           static const char *c_loc_names[] = { N_("Undefined"),
+               N_("Left"),
+               N_("Center"),
+               N_("Top Left"),
+               N_("Top Center"),
+               N_("Bottom Left"),
+               N_("Bottom Center"),
+           };
+           info_category_AddInfo( p_cat, _("Chroma location"), "%s",
+                   _(c_loc_names[fmt->video.chroma_location]) );
+       }
        break;
 
     case SPU_ES:



More information about the vlc-commits mailing list