forked from FFmpeg/FFmpeg
lavd/avfoundation: Use internal av_strtok instead of std lib strtok
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
7656c4c6e6
commit
48c29883fc
1 changed files with 5 additions and 3 deletions
|
@ -30,6 +30,7 @@
|
||||||
|
|
||||||
#include "libavutil/pixdesc.h"
|
#include "libavutil/pixdesc.h"
|
||||||
#include "libavutil/opt.h"
|
#include "libavutil/opt.h"
|
||||||
|
#include "libavutil/avstring.h"
|
||||||
#include "libavformat/internal.h"
|
#include "libavformat/internal.h"
|
||||||
#include "libavutil/internal.h"
|
#include "libavutil/internal.h"
|
||||||
#include "libavutil/time.h"
|
#include "libavutil/time.h"
|
||||||
|
@ -253,12 +254,13 @@ static void parse_device_name(AVFormatContext *s)
|
||||||
{
|
{
|
||||||
AVFContext *ctx = (AVFContext*)s->priv_data;
|
AVFContext *ctx = (AVFContext*)s->priv_data;
|
||||||
char *tmp = av_strdup(s->filename);
|
char *tmp = av_strdup(s->filename);
|
||||||
|
char *save;
|
||||||
|
|
||||||
if (tmp[0] != ':') {
|
if (tmp[0] != ':') {
|
||||||
ctx->video_filename = strtok(tmp, ":");
|
ctx->video_filename = av_strtok(tmp, ":", &save);
|
||||||
ctx->audio_filename = strtok(NULL, ":");
|
ctx->audio_filename = av_strtok(NULL, ":", &save);
|
||||||
} else {
|
} else {
|
||||||
ctx->audio_filename = strtok(tmp, ":");
|
ctx->audio_filename = av_strtok(tmp, ":", &save);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue