bufferpool: return empty metadata array
authorWim Taymans <wim.taymans@collabora.co.uk>
Tue, 21 Jun 2011 10:32:46 +0000 (12:32 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Tue, 21 Jun 2011 10:32:46 +0000 (12:32 +0200)
Return a string array with NULL instead of NULL from the default get_metas
function.

gst/gstbufferpool.c

index 09a19c8..7eafdfe 100644 (file)
@@ -482,6 +482,8 @@ gst_buffer_pool_get_config (GstBufferPool * pool)
   return result;
 }
 
+static const gchar *empty_meta[] = { NULL };
+
 /**
  * gst_buffer_pool_get_metas:
  * @pool: a #GstBufferPool
@@ -505,7 +507,7 @@ gst_buffer_pool_get_metas (GstBufferPool * pool)
   if (G_LIKELY (pclass->get_metas))
     result = pclass->get_metas (pool);
   else
-    result = NULL;
+    result = empty_meta;
 
   return result;
 }