From 9660a8bd3a473f45c702d2ce6ae9b709cf170310 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Thu, 15 May 2014 09:46:24 +0200 Subject: [PATCH] validate: Properly use boolean in XML --- validate/gst/validate/media-descriptor-parser.c | 10 +++++++--- validate/gst/validate/media-descriptor-writer.c | 10 +++++----- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/validate/gst/validate/media-descriptor-parser.c b/validate/gst/validate/media-descriptor-parser.c index f62bdd7c32..4209637976 100644 --- a/validate/gst/validate/media-descriptor-parser.c +++ b/validate/gst/validate/media-descriptor-parser.c @@ -55,7 +55,7 @@ compare_frames (FrameNode * frm, FrameNode * frm1) } static void -deserialize_filenode (FileNode *filenode, +deserialize_filenode (FileNode * filenode, const gchar ** names, const gchar ** values) { gint i; @@ -134,8 +134,12 @@ deserialize_framenode (const gchar ** names, const gchar ** values) framenode->pts = g_ascii_strtoull (values[i], NULL, 0); else if (g_strcmp0 (names[i], "dts") == 0) framenode->dts = g_ascii_strtoull (values[i], NULL, 0); - else if (g_strcmp0 (names[i], "is-keyframe") == 0) - framenode->is_keyframe = g_ascii_strtoull (values[i], NULL, 0); + else if (g_strcmp0 (names[i], "is-keyframe") == 0) { + if (g_ascii_strcasecmp (values[i], "true")) + framenode->is_keyframe = TRUE; + else + framenode->is_keyframe = FALSE; + } } framenode->buf = gst_buffer_new (); diff --git a/validate/gst/validate/media-descriptor-writer.c b/validate/gst/validate/media-descriptor-writer.c index 5e8bfdf436..2be7fba8e9 100644 --- a/validate/gst/validate/media-descriptor-writer.c +++ b/validate/gst/validate/media-descriptor-writer.c @@ -464,8 +464,8 @@ _run_frame_analisis (GstMediaDescriptorWriter * writer, writer->priv->pipeline = gst_pipeline_new ("frame-analisis"); monitor = - gst_validate_monitor_factory_create (GST_OBJECT_CAST (writer->priv-> - pipeline), runner, NULL); + gst_validate_monitor_factory_create (GST_OBJECT_CAST (writer-> + priv->pipeline), runner, NULL); gst_validate_reporter_set_handle_g_logs (GST_VALIDATE_REPORTER (monitor)); g_object_set (uridecodebin, "uri", uri, "caps", writer->priv->raw_caps, NULL); @@ -735,11 +735,11 @@ gst_media_descriptor_writer_add_frame (GstMediaDescriptorWriter fnode->str_open = g_markup_printf_escaped (" ", fnode->duration, id, - fnode->is_keyframe, fnode->offset, fnode->offset_end, fnode->pts, - fnode->dts); + fnode->is_keyframe ? "true" : "false", + fnode->offset, fnode->offset_end, fnode->pts, fnode->dts); fnode->str_close = NULL;