mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
meta: improve test a little
This commit is contained in:
parent
8468dadc77
commit
023cada1f4
1 changed files with 4 additions and 6 deletions
|
@ -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);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue