videoaggregator: Don't try to map NULL buffers
authorSebastian Dröge <sebastian@centricular.com>
Thu, 18 Dec 2014 21:04:38 +0000 (22:04 +0100)
committerSebastian Dröge <sebastian@centricular.com>
Thu, 18 Dec 2014 21:04:38 +0000 (22:04 +0100)
gst-libs/gst/video/gstvideoaggregator.c

index 9a6374a..023c392 100644 (file)
@@ -226,9 +226,14 @@ gst_video_aggregator_pad_prepare_frame (GstVideoAggregatorPad * pad,
   guint outsize;
   GstVideoFrame *converted_frame;
   GstBuffer *converted_buf = NULL;
-  GstVideoFrame *frame = g_slice_new0 (GstVideoFrame);
+  GstVideoFrame *frame;
   static GstAllocationParams params = { 0, 15, 0, 0, };
 
+  if (!pad->buffer)
+    return TRUE;
+
+  frame = g_slice_new0 (GstVideoFrame);
+
   if (!gst_video_frame_map (frame, &pad->buffer_vinfo, pad->buffer,
           GST_MAP_READ)) {
     GST_WARNING_OBJECT (vagg, "Could not map input buffer");