diff options
author | Thibault Saunier <thibault.saunier@osg.samsung.com> | 2017-07-21 10:17:00 -0400 |
---|---|---|
committer | Thibault Saunier <thibault.saunier@osg.samsung.com> | 2017-07-21 10:19:37 -0400 |
commit | 7e8fe2844bf784f0a2171af71608519d8062d158 (patch) | |
tree | b6676dc004be442489a11fd5415a1012d9b76f85 /tests | |
parent | a3545637ded52ebba76ec77e359299a2109d735b (diff) |
tests:icles: Do not use memmem GNU extension function
As it is not avalaible on windows/msvc and we can use pure GLib for that
Diffstat (limited to 'tests')
-rw-r--r-- | tests/icles/test-accurate-seek.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/icles/test-accurate-seek.c b/tests/icles/test-accurate-seek.c index 16e137d75..cb1675b72 100644 --- a/tests/icles/test-accurate-seek.c +++ b/tests/icles/test-accurate-seek.c @@ -22,7 +22,6 @@ # include "config.h" #endif -#define _GNU_SOURCE /* for memmem */ #include <string.h> #include <gst/gst.h> @@ -209,7 +208,10 @@ test_seek_FORMAT_TIME_by_sample (const gchar * fn, GList * seek_positions) buf = gst_sample_get_buffer (sample); gst_buffer_map (buf, &map, GST_MAP_READ); - found = memmem (answer, answer_size, map.data, map.size); + if (map.size > answer_size) + found = NULL; + else + found = g_strstr_len (answer, answer_size, (gchar *) map.data); gst_buffer_unmap (buf, &map); g_assert (found != NULL); |