diff --git a/src/k3mix.c b/src/k3mix.c index 2c260bc..84b7cf2 100644 --- a/src/k3mix.c +++ b/src/k3mix.c @@ -1,6 +1,5 @@ #include"k3mix.h" -#define _GNU_SOURCE #include #include #include @@ -9,6 +8,10 @@ #include #include"k3.h" +#ifdef _WIN32 +#define strncasecmp _strnicmp +#endif + static uint32_t FinalSampleRate; static uint8_t FinalChannels; @@ -31,7 +34,7 @@ struct k3MixSource *k3MixSourceFile(const char *path) { ret->looppoint = 0; for(size_t ci = 0; ci < ret->vf.vc->comments; ci++) { - if(strcasestr(ret->vf.vc->user_comments[ci], "looppoint=") == ret->vf.vc->user_comments[ci]) { + if(strncasecmp(ret->vf.vc->user_comments[ci], "looppoint=", 10) == 0) { ret->looppoint = strtol(ret->vf.vc->user_comments[ci] + 10, NULL, 0); k3Log(k3_DEBUG, "%s has loop point %lu", path, ret->looppoint); }