[totem] chapters: Warn about ignored chapters when parsing a CMML file



commit 2abb8f5e460c93c3890626f0695356fc3513c9dc
Author: Philip Withnall <philip tecnocode co uk>
Date:   Thu Apr 14 18:29:43 2011 +0100

    chapters: Warn about ignored chapters when parsing a CMML file

 src/plugins/chapters/totem-cmml-parser.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/chapters/totem-cmml-parser.c b/src/plugins/chapters/totem-cmml-parser.c
index 01cacba..59e9ada 100644
--- a/src/plugins/chapters/totem-cmml-parser.c
+++ b/src/plugins/chapters/totem-cmml-parser.c
@@ -488,11 +488,13 @@ totem_cmml_read_clip_cb (TotemCmmlClip	*clip,
 
 	new_clip = totem_cmml_clip_copy (clip);
 
-	if (G_LIKELY (new_clip != NULL && new_clip->time_start >= 0))
+	if (G_LIKELY (new_clip != NULL && new_clip->time_start >= 0)) {
 		* ( (GList **) user_data) = g_list_append ( * ( (GList **) user_data), new_clip);
 	/* clip with -1 start time is bad one, remove it */
-	else
+	} else if (new_clip != NULL) {
+		g_warning ("Ignoring clip '%s' due to having an invalid start time: %" G_GINT64_FORMAT, new_clip->title, new_clip->time_start);
 		totem_cmml_clip_free (new_clip);
+	}
 }
 
 /**



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]