discoverer: Fix code style a bit
authorSebastian Dröge <sebastian@centricular.com>
Mon, 21 Jul 2014 11:53:17 +0000 (13:53 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Mon, 21 Jul 2014 11:53:17 +0000 (13:53 +0200)
if (...)
  one_line;
else if (...) {
  many_lines;
} else
  one_line;

looks a bit confusing.

tools/gst-discoverer.c

index 1f0b4d0..50bc17d 100644 (file)
@@ -307,9 +307,9 @@ print_tag_foreach (const GstTagList * tags, const gchar * tag,
 
   gst_tag_list_copy_value (&val, tags, tag);
 
-  if (G_VALUE_HOLDS_STRING (&val))
+  if (G_VALUE_HOLDS_STRING (&val)) {
     str = g_value_dup_string (&val);
-  else if (G_VALUE_TYPE (&val) == GST_TYPE_SAMPLE) {
+  else if (G_VALUE_TYPE (&val) == GST_TYPE_SAMPLE) {
     GstSample *sample = gst_value_get_sample (&val);
     GstBuffer *img = gst_sample_get_buffer (sample);
     GstCaps *caps = gst_sample_get_caps (sample);
@@ -329,8 +329,9 @@ print_tag_foreach (const GstTagList * tags, const gchar * tag,
     } else {
       str = g_strdup ("NULL buffer");
     }
-  } else
+  } else {
     str = gst_value_serialize (&val);
+  }
 
   g_print ("%*s%s: %s\n", 2 * depth, " ", gst_tag_get_nick (tag), str);
   g_free (str);