adapter: handle map failure
authorWim Taymans <wim.taymans@collabora.co.uk>
Mon, 14 Jan 2013 16:00:23 +0000 (17:00 +0100)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Thu, 17 Jan 2013 09:34:05 +0000 (09:34 +0000)
libs/gst/base/gstadapter.c

index 90d5263220625d28db33075f925de1d2f32c398b..654118b61ba708d5edf1b09e82d986ebd831572e 100644 (file)
@@ -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);