diff options
author | wm4 <wm4@nowhere> | 2013-01-13 16:13:13 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-01-13 17:32:39 +0100 |
commit | 20c9dfa61692d9ed741a91177d3fa185d73c02dd (patch) | |
tree | 8931b8f4036bbcc4941c8d372546b08dbd75e53b /audio | |
parent | cbdee50f29e2d1c44453f7b5ed5d67296f7a16dc (diff) | |
download | mpv-20c9dfa61692d9ed741a91177d3fa185d73c02dd.tar.bz2 mpv-20c9dfa61692d9ed741a91177d3fa185d73c02dd.tar.xz |
Replace strsep() uses
This function sucks and apparently is not very portable (at least on
mingw, the configure check fails). Also remove the emulation of that
function from osdep/strsep*, and remove the configure check.
Diffstat (limited to 'audio')
-rw-r--r-- | audio/filter/af.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/audio/filter/af.c b/audio/filter/af.c index 1f3e446821..8afedbcfe5 100644 --- a/audio/filter/af.c +++ b/audio/filter/af.c @@ -20,7 +20,6 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> -#include "osdep/strsep.h" #include "af.h" @@ -129,7 +128,13 @@ static struct af_instance* af_create(struct af_stream* s, const char* name_with_ memset(new,0,sizeof(struct af_instance)); // Check for commandline parameters - strsep(&cmdline, "="); + char *skip = strstr(cmdline, "="); + if (skip) { + *skip = '\0'; // for name + cmdline = skip + 1; + } else { + cmdline = NULL; + } // Find filter from name if(NULL == (new->info=af_find(name))) |