postproc/postprocess: use av_strtok()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/113/head
Michael Niedermayer 10 years ago
parent 921caf6203
commit 9e8be46252
  1. 7
      libpostproc/postprocess.c

@ -708,11 +708,12 @@ pp_mode *pp_get_mode_by_name_and_quality(const char *name, int quality)
int filterNameOk=0; int filterNameOk=0;
int numOfUnknownOptions=0; int numOfUnknownOptions=0;
int enable=1; //does the user want us to enabled or disabled the filter int enable=1; //does the user want us to enabled or disabled the filter
char *tokstate;
filterToken= strtok(p, filterDelimiters); filterToken= av_strtok(p, filterDelimiters, &tokstate);
if(!filterToken) break; if(!filterToken) break;
p+= strlen(filterToken) + 1; // p points to next filterToken p+= strlen(filterToken) + 1; // p points to next filterToken
filterName= strtok(filterToken, optionDelimiters); filterName= av_strtok(filterToken, optionDelimiters, &tokstate);
if (!filterName) { if (!filterName) {
ppMode->error++; ppMode->error++;
break; break;
@ -725,7 +726,7 @@ pp_mode *pp_get_mode_by_name_and_quality(const char *name, int quality)
} }
for(;;){ //for all options for(;;){ //for all options
option= strtok(NULL, optionDelimiters); option= av_strtok(NULL, optionDelimiters, &tokstate);
if(!option) break; if(!option) break;
av_log(NULL, AV_LOG_DEBUG, "pp: option: %s\n", option); av_log(NULL, AV_LOG_DEBUG, "pp: option: %s\n", option);

Loading…
Cancel
Save