From 1f7fba19f7aec15bd1f1adcfc39aab827c1ac44b Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Wed, 16 Apr 2014 11:40:46 +0200 Subject: [PATCH] gstcheck: Check return value of gst_buffer_map We can't check contents if we don't have access to it https://bugzilla.gnome.org/show_bug.cgi?id=728326 --- libs/gst/check/gstcheck.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/gst/check/gstcheck.c b/libs/gst/check/gstcheck.c index a5e3e06910..e09e29c950 100644 --- a/libs/gst/check/gstcheck.c +++ b/libs/gst/check/gstcheck.c @@ -551,7 +551,7 @@ gst_check_buffer_data (GstBuffer * buffer, gconstpointer data, gsize size) { GstMapInfo info; - gst_buffer_map (buffer, &info, GST_MAP_READ); + fail_unless (gst_buffer_map (buffer, &info, GST_MAP_READ)); GST_MEMDUMP ("Converted data", info.data, info.size); GST_MEMDUMP ("Expected data", data, size); if (memcmp (info.data, data, size) != 0) { @@ -698,8 +698,8 @@ gst_check_element_push_buffer_list (const gchar * element_name, GstBuffer *orig = GST_BUFFER (buffer_out->data); GstMapInfo newinfo, originfo; - gst_buffer_map (new, &newinfo, GST_MAP_READ); - gst_buffer_map (orig, &originfo, GST_MAP_READ); + fail_unless (gst_buffer_map (new, &newinfo, GST_MAP_READ)); + fail_unless (gst_buffer_map (orig, &originfo, GST_MAP_READ)); GST_LOG ("orig buffer: size %" G_GSIZE_FORMAT, originfo.size); GST_LOG ("new buffer: size %" G_GSIZE_FORMAT, newinfo.size);