summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2013-01-14 17:00:23 +0100
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2013-01-17 09:34:05 +0000
commited001daaebbadf3acaa4644746368d6b4b7e2c35 (patch)
treec1f07a6935dc272d3d1a28cc3fbae3120fdcf17c
parente4f420640a130993acf98dbf81b3f2a4fba2c5a2 (diff)
adapter: handle map failure
-rw-r--r--libs/gst/base/gstadapter.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/gst/base/gstadapter.c b/libs/gst/base/gstadapter.c
index 90d526322..654118b61 100644
--- a/libs/gst/base/gstadapter.c
+++ b/libs/gst/base/gstadapter.c
@@ -1044,7 +1044,9 @@ gst_adapter_masked_scan_uint32_peek (GstAdapter * adapter, guint32 mask,
gst_buffer_unmap (buf, &info);
buf = g->data;
- gst_buffer_map (buf, &info, GST_MAP_READ);
+ if (!gst_buffer_map (buf, &info, GST_MAP_READ))
+ return -1;
+
bsize = info.size;
bdata = info.data;
} while (TRUE);