volume: cast outputs to correct type before comparing

This commit is contained in:
Stefan Sauer 2012-04-25 18:42:04 +02:00
parent f9facc6a4a
commit bcbb58ccbd

View File

@ -1694,7 +1694,7 @@ GST_START_TEST (test_passthrough)
GstElement *volume; GstElement *volume;
GstBuffer *inbuffer, *outbuffer; GstBuffer *inbuffer, *outbuffer;
GstCaps *caps; GstCaps *caps;
gint16 in[2] = { 16384, -256 }; gint16 *out, in[2] = { 16384, -256 };
GstMapInfo map; GstMapInfo map;
volume = setup_volume (); volume = setup_volume ();
@ -1718,8 +1718,8 @@ GST_START_TEST (test_passthrough)
fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL); fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
fail_unless (inbuffer == outbuffer); fail_unless (inbuffer == outbuffer);
gst_buffer_map (outbuffer, &map, GST_MAP_READ); gst_buffer_map (outbuffer, &map, GST_MAP_READ);
GST_INFO ("expected %+5d %+5d real %+5d %+5d", in[0], in[1], map.data[0], out = (gint16 *) map.data;
map.data[1]); GST_INFO ("expected %+5d %+5d real %+5d %+5d", in[0], in[1], out[0], out[1]);
fail_unless (memcmp (map.data, in, 4) == 0); fail_unless (memcmp (map.data, in, 4) == 0);
gst_buffer_unmap (outbuffer, &map); gst_buffer_unmap (outbuffer, &map);
@ -1763,7 +1763,7 @@ GST_START_TEST (test_controller_processing)
GstElement *volume; GstElement *volume;
GstBuffer *inbuffer, *outbuffer; GstBuffer *inbuffer, *outbuffer;
GstCaps *caps; GstCaps *caps;
gint16 in[2] = { 16384, -256 }; gint16 *out, in[2] = { 16384, -256 };
GstMapInfo map; GstMapInfo map;
GstSegment seg; GstSegment seg;
@ -1798,8 +1798,8 @@ GST_START_TEST (test_controller_processing)
fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL); fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
fail_unless (inbuffer == outbuffer); fail_unless (inbuffer == outbuffer);
gst_buffer_map (outbuffer, &map, GST_MAP_READ); gst_buffer_map (outbuffer, &map, GST_MAP_READ);
GST_INFO ("expected %+5d %+5d real %+5d %+5d", in[0], in[1], map.data[0], out = (gint16 *) map.data;
map.data[1]); GST_INFO ("expected %+5d %+5d real %+5d %+5d", in[0], in[1], out[0], out[1]);
fail_unless (memcmp (map.data, in, 4) == 0); fail_unless (memcmp (map.data, in, 4) == 0);
gst_buffer_unmap (outbuffer, &map); gst_buffer_unmap (outbuffer, &map);