tests: fix more unit tests

This commit is contained in:
Wim Taymans 2012-02-06 13:29:24 +01:00
parent 44d369211c
commit f3f54403b1
2 changed files with 8 additions and 5 deletions

View file

@ -103,10 +103,10 @@ on_handoff (GstElement * object, GstBuffer * buffer, GstPad * pad,
{
if (!have_data) {
GstMapInfo map;
gdouble *data;
gfloat *data;
gst_buffer_map (buffer, &map, GST_MAP_READ);
data = (gdouble *) map.data;
fail_unless (gst_buffer_map (buffer, &map, GST_MAP_READ));
data = (gfloat *) map.data;
fail_unless (map.size > 5 * sizeof (gdouble));
fail_unless (data[0] == 0.0);

View file

@ -40,6 +40,7 @@ GstPad *mysrcpad, *mysinkpad;
#define INVERT_CAPS_STRING \
"audio/x-raw, " \
"format = (string) "GST_AUDIO_NE(S16)", " \
"layout = (string) interleaved, " \
"channels = (int) 1, " \
"rate = (int) 44100"
@ -48,6 +49,7 @@ static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_ALWAYS,
GST_STATIC_CAPS ("audio/x-raw, "
"format = (string) " GST_AUDIO_NE (S16) ", "
"layout = (string) interleaved, "
"channels = (int) 1, " "rate = (int) [ 1, MAX ]")
);
static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
@ -55,6 +57,7 @@ static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_ALWAYS,
GST_STATIC_CAPS ("audio/x-raw, "
"format = (string) " GST_AUDIO_NE (S16) ", "
"layout = (string) interleaved, "
"channels = (int) 1, " "rate = (int) [ 1, MAX ]")
);