summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2013-01-07 12:13:32 +0100
committerBastien Nocera <hadess@hadess.net>2013-01-07 12:13:32 +0100
commitb836edfd648a747d6a1356c2d24cf82794c2fd89 (patch)
tree108322e39bd3a9fdf05c8a4693d0c3dc6820b94c /src
parent806500028e254faa78a829807b187602edecea3a (diff)
downloadtotem-b836edfd648a747d6a1356c2d24cf82794c2fd89.tar.gz
backend: Don't report empty properties
When a property only contains spaces, trim them out to avoid empty properties.
Diffstat (limited to 'src')
-rw-r--r--src/backend/bacon-video-widget.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/backend/bacon-video-widget.c b/src/backend/bacon-video-widget.c
index 657706b66..c38881ecb 100644
--- a/src/backend/bacon-video-widget.c
+++ b/src/backend/bacon-video-widget.c
@@ -5487,8 +5487,10 @@ bacon_video_widget_get_metadata_string (BaconVideoWidget * bvw,
/* Remove line feeds */
if (string && strstr (string, "\n") != NULL)
g_strdelimit (string, "\n", ' ');
+ if (string != NULL)
+ string = g_strstrip (string);
- if (res && string && g_utf8_validate (string, -1, NULL)) {
+ if (res && string && *string != '\0' && g_utf8_validate (string, -1, NULL)) {
g_value_take_string (value, string);
GST_DEBUG ("%s = '%s'", get_type_name (BVW_TYPE_METADATA_TYPE, type), string);
} else {