summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorWangfei <fei.w.wang@intel.com>2018-11-03 15:28:35 +0800
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2018-11-05 14:06:47 +0100
commit2cdcca7aba5311a6d6b037ed103f857cf731a015 (patch)
tree7547fcebb8984f72e787a28e24c297ec2370984d /tests
parent254eb9507f5e3c51552bfdf6c4b97650e847d55a (diff)
tests: check return value when using gst_buffer_map.
https://bugzilla.gnome.org/show_bug.cgi?id=797366
Diffstat (limited to 'tests')
-rw-r--r--tests/simple-encoder.c3
-rw-r--r--tests/test-fei-enc-in.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/tests/simple-encoder.c b/tests/simple-encoder.c
index 9ae63d87..c94f3b5f 100644
--- a/tests/simple-encoder.c
+++ b/tests/simple-encoder.c
@@ -234,7 +234,8 @@ outputs_to_file (GstBuffer * buffer, FILE * file)
size_t written;
gboolean ret = FALSE;
- gst_buffer_map (buffer, &info, GST_MAP_READ);
+ if (!gst_buffer_map (buffer, &info, GST_MAP_READ))
+ return FALSE;
if (info.size <= 0 || !info.data)
return FALSE;
diff --git a/tests/test-fei-enc-in.c b/tests/test-fei-enc-in.c
index 10d8de7c..d64a9468 100644
--- a/tests/test-fei-enc-in.c
+++ b/tests/test-fei-enc-in.c
@@ -279,7 +279,8 @@ outputs_to_file (GstBuffer * buffer, FILE * file)
size_t written;
gboolean ret = FALSE;
- gst_buffer_map (buffer, &info, GST_MAP_READ);
+ if (!gst_buffer_map (buffer, &info, GST_MAP_READ))
+ return FALSE;
if (info.size <= 0 || !info.data)
return FALSE;