summaryrefslogtreecommitdiff
path: root/tools/gst-discoverer.c
diff options
context:
space:
mode:
authorStefan Kost <ensonic@users.sf.net>2011-02-22 16:41:54 +0200
committerStefan Kost <ensonic@users.sf.net>2011-02-22 16:43:08 +0200
commit399f528a332cdcfbdef9f00db4c8c4605e302aa8 (patch)
treeceff3493f3089352f4c31ec79c2a08bdc823dbff /tools/gst-discoverer.c
parent8fc424bcbf017d9ccb4aa3aedb2c9c17ab7dc495 (diff)
downloadgstreamer-plugins-base-399f528a332cdcfbdef9f00db4c8c4605e302aa8.tar.gz
discoverer: handle desc==NULL
It would otherwise be printed as (null) and mess up indentation (no \n).
Diffstat (limited to 'tools/gst-discoverer.c')
-rw-r--r--tools/gst-discoverer.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/gst-discoverer.c b/tools/gst-discoverer.c
index c68721b1b..00d2d0f41 100644
--- a/tools/gst-discoverer.c
+++ b/tools/gst-discoverer.c
@@ -204,8 +204,10 @@ print_stream_info (GstDiscovererStreamInfo * info, void *depth)
desc =
gst_stream_video_information_to_string (info,
GPOINTER_TO_INT (depth) + 1);
- g_print ("%s", desc);
- g_free (desc);
+ if (desc) {
+ g_print ("%s", desc);
+ g_free (desc);
+ }
}
}