From 400511b71ec2506d4a289eb343d3ae6c6f4977ad Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Sat, 26 May 2012 19:53:50 +0100 Subject: [PATCH] gst-discoverer: print all entries for a certain tag If there are multiple entries for a tag, print all of them individually. --- tools/gst-discoverer.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/gst-discoverer.c b/tools/gst-discoverer.c index 04792b6935..f706f550a2 100644 --- a/tools/gst-discoverer.c +++ b/tools/gst-discoverer.c @@ -403,11 +403,14 @@ print_properties (GstDiscovererInfo * info, gint tab) for (i = 0; i < num_tags; ++i) { const GValue *val; const gchar *tag_name; + guint num_entries, j; tag_name = gst_tag_list_nth_tag_name (tags, i); - /* FIXME: print all entries for a tag if there are multiple ones */ - val = gst_tag_list_get_value_index (tags, tag_name, 0); - print_tag (tag_name, val, tab + 5); + num_entries = gst_tag_list_get_tag_size (tags, tag_name); + for (j = 0; j < num_entries; ++j) { + val = gst_tag_list_get_value_index (tags, tag_name, j); + print_tag (tag_name, val, tab + 5); + } } } if (show_toc && (toc = gst_discoverer_info_get_toc (info))) { -- 2.34.1