meta: improve test a little

This commit is contained in:
Wim Taymans 2009-12-27 22:03:32 +01:00
parent 8468dadc77
commit 023cada1f4

View file

@ -32,8 +32,6 @@
#include <gst/check/gstcheck.h> #include <gst/check/gstcheck.h>
static const GstBufferMetaInfo *test_meta_info = NULL;
/* test metadata for PTS/DTS and duration */ /* test metadata for PTS/DTS and duration */
typedef struct typedef struct
{ {
@ -118,9 +116,11 @@ test_sub_func (GstBuffer * sub, GstTestMeta * meta, GstBuffer * buffer,
test->clock_rate = meta->clock_rate; test->clock_rate = meta->clock_rate;
} }
static void static const GstBufferMetaInfo *
register_metadata (void) gst_test_meta_get_info (void)
{ {
static const GstBufferMetaInfo *test_meta_info = NULL;
if (test_meta_info == NULL) { if (test_meta_info == NULL) {
static const GstBufferMetaInfo info = { static const GstBufferMetaInfo info = {
"GstTestMeta", "GstTestMeta",
@ -142,8 +142,6 @@ GST_START_TEST (test_metadata)
GstBuffer *buffer, *copy, *subbuf; GstBuffer *buffer, *copy, *subbuf;
GstTestMeta *meta; GstTestMeta *meta;
register_metadata ();
buffer = gst_buffer_new_and_alloc (4); buffer = gst_buffer_new_and_alloc (4);
memset (GST_BUFFER_DATA (buffer), 0, 4); memset (GST_BUFFER_DATA (buffer), 0, 4);