diff options
author | Stefano Sabatini <stefasab@gmail.com> | 2011-10-15 02:14:37 +0400 |
---|---|---|
committer | Stefano Sabatini <stefasab@gmail.com> | 2011-10-18 20:21:03 +0400 |
commit | b35e9e19e93b0c69303444e9974ee640a924f798 (patch) | |
tree | 09c93cf03ae3e1902b312eef74aab72f75180da9 /libavfilter/af_aconvert.c | |
parent | 88bdf7471f6b8df5106f84b4b4d4cffe4606bcb0 (diff) |
lavu: add av_strtok()
The function strtok_r() is part of the POSIX.1 specification, but is not
available on some platforms. We provide an internal implementation, so we
do not need to rely on a platform implementation.
Diffstat (limited to 'libavfilter/af_aconvert.c')
-rw-r--r-- | libavfilter/af_aconvert.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libavfilter/af_aconvert.c b/libavfilter/af_aconvert.c index d794c23576..fef096cb8e 100644 --- a/libavfilter/af_aconvert.c +++ b/libavfilter/af_aconvert.c @@ -28,6 +28,7 @@ */ #include "libavutil/audioconvert.h" +#include "libavutil/avstring.h" #include "libavcodec/audioconvert.h" #include "avfilter.h" #include "internal.h" @@ -125,15 +126,15 @@ static av_cold int init(AVFilterContext *ctx, const char *args0, void *opaque) aconvert->out_chlayout = 0; aconvert->out_packing_fmt = -1; - if ((arg = strtok_r(args, ":", &ptr)) && strcmp(arg, "auto")) { + if ((arg = av_strtok(args, ":", &ptr)) && strcmp(arg, "auto")) { if ((ret = ff_parse_sample_format(&aconvert->out_sample_fmt, arg, ctx)) < 0) goto end; } - if ((arg = strtok_r(NULL, ":", &ptr)) && strcmp(arg, "auto")) { + if ((arg = av_strtok(NULL, ":", &ptr)) && strcmp(arg, "auto")) { if ((ret = ff_parse_channel_layout(&aconvert->out_chlayout, arg, ctx)) < 0) goto end; } - if ((arg = strtok_r(NULL, ":", &ptr)) && strcmp(arg, "auto")) { + if ((arg = av_strtok(NULL, ":", &ptr)) && strcmp(arg, "auto")) { if ((ret = ff_parse_packing_format((int *)&aconvert->out_packing_fmt, arg, ctx)) < 0) goto end; } |