diff options
author | Stefan Kost <ensonic@users.sf.net> | 2011-02-22 16:41:54 +0200 |
---|---|---|
committer | Stefan Kost <ensonic@users.sf.net> | 2011-02-22 16:43:08 +0200 |
commit | 399f528a332cdcfbdef9f00db4c8c4605e302aa8 (patch) | |
tree | ceff3493f3089352f4c31ec79c2a08bdc823dbff | |
parent | 8fc424bcbf017d9ccb4aa3aedb2c9c17ab7dc495 (diff) |
discoverer: handle desc==NULL
It would otherwise be printed as (null) and mess up indentation (no \n).
-rw-r--r-- | tools/gst-discoverer.c | 6 |
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); + } } } |