buffer: Check return value of meta transform function in gst_buffer_copy_into()
authorSebastian Dröge <sebastian@centricular.com>
Mon, 20 Apr 2015 07:23:43 +0000 (09:23 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Mon, 20 Apr 2015 07:23:43 +0000 (09:23 +0200)
... by printing some debug output whenever copying a GstMeta fails.

https://bugzilla.gnome.org/show_bug.cgi?id=748119

gst/gstbuffer.c

index 74f86d0..07d1e29 100644 (file)
@@ -498,8 +498,12 @@ gst_buffer_copy_into (GstBuffer * dest, GstBuffer * src,
         copy_data.offset = offset;
         copy_data.size = size;
 
-        info->transform_func (dest, meta, src,
-            _gst_meta_transform_copy, &copy_data);
+        if (!info->transform_func (dest, meta, src,
+                _gst_meta_transform_copy, &copy_data)) {
+          GST_CAT_ERROR (GST_CAT_BUFFER,
+              "failed to copy meta %p of API type %s", meta,
+              g_type_name (info->api));
+        }
       }
     }
   }