From bac5ba632e4d02cb2b4a383ab968c86825fd46b3 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 14 Jan 2013 17:00:23 +0100 Subject: [PATCH] adapter: handle map failure --- libs/gst/base/gstadapter.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/gst/base/gstadapter.c b/libs/gst/base/gstadapter.c index 74bcee0..71c546a 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); -- 2.7.4